Skip to content

Update TypeScript to v4.6+ #720

@teppeis

Description

@teppeis

tsc throws errors with typescript@4.6.

$ npm run build       

> @cybozu/duck@0.33.3 build
> tsc

node_modules/@types/verror/index.d.ts:31:5 - error TS2416: Property 'cause' in type 'VError' is not assignable to the same property in base type 'Error'.
  Property 'message' is missing in type '() => Error | undefined' but required in type 'Error'.

31     cause(): Error | undefined;
       ~~~~~

  node_modules/typescript/lib/lib.es5.d.ts:1023:5
    1023     message: string;
             ~~~~~~~
    'message' is declared here.

node_modules/@types/verror/index.d.ts:31:5 - error TS2425: Class 'Error' defines instance member property 'cause', but extended class 'VError' defines it as instance member function.

31     cause(): Error | undefined;
       ~~~~~


Found 2 errors in the same file, starting at: node_modules/@types/verror/index.d.ts:31

It will be resolved in next TypeScript 4.8.

See

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions