Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update express to 4.17.21 #355

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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

> [email protected] 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