Skip to content

Reenable TypeScript checking of libraries #231

@smarr

Description

@smarr

In #230, I added "skipLibCheck": true to the tsconfig.json, which disables the type checking of library code.

This was done because I got the following errors, and didn't find a solution:

node_modules/@types/express-serve-static-core/index.d.ts:395:18 - error TS2430: Interface 'Request<P, ResBody, ReqBody, ReqQuery, LocalsObj>' incorrectly extends interface 'IncomingMessage'.
  Types of property 'body' are incompatible.
    Type 'ReqBody' is not assignable to type 'string | { [key: string]: unknown; } | undefined'.
      Type 'ReqBody' is not assignable to type '{ [key: string]: unknown; }'.

395 export interface Request<
                     ~~~~~~~

  node_modules/@types/express-serve-static-core/index.d.ts:398:5
    398     ReqBody = any,
            ~~~~~~~~~~~~~
    This type parameter might need an `extends { [key: string]: unknown; }` constraint.
  node_modules/@types/express-serve-static-core/index.d.ts:398:5
    398     ReqBody = any,
            ~~~~~~~~~~~~~
    This type parameter might need an `extends string | { [key: string]: unknown; } | undefined` constraint.

This should be revisited, and skipLibCheck should be removed again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions