turt2live / matrix-bot-sdk

TypeScript/JavaScript SDK for Matrix bots
MIT License
199 stars 69 forks source link

Update express to 4.17.21 #355

Open Half-Shot opened 9 months ago

Half-Shot commented 9 months ago

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>;
                                                         ~~~~~~~~