Skip to content

Conversation

Half-Shot
Copy link
Contributor

@Half-Shot Half-Shot commented Jan 5, 2024

Prevents type incompatibilities with newer @types/node versions a.k.a:

$ npm run build

> matrix-bifrost@0.4.2 build
> tsc

node_modules/@types/express-serve-static-core/index.d.ts:589:18 - error TS2430: Interface 'Response<ResBody, Locals, StatusCode>' incorrectly extends interface 'ServerResponse<IncomingMessage>'.
  Property 'req' is optional in type 'Response<ResBody, Locals, StatusCode>' but required in type 'ServerResponse<IncomingMessage>'.

589 export interface Response<
                     ~~~~~~~~

node_modules/@types/express/index.d.ts:58:55 - error TS2344: Type 'Response<any, Record<string, any>>' does not satisfy the constraint 'ServerResponse<IncomingMessage>'.
  Property 'req' is optional in type 'Response<any, Record<string, any>>' but required in type 'ServerResponse<IncomingMessage>'.

58     var static: serveStatic.RequestHandlerConstructor<Response>;
                                                         ~~~~~~~~

Prevents type errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant