Skip to content

Upgrading to node 18+, getting "error TS2425: Class 'Exception' defines instance member property 'cause', but extended class 'TraceError' defines it as instance member function" #14

Description

@taschmidt

ES2022 added a cause property to the Error class (ref link) which breaks this lib.

The error thrown is:

node_modules/trace-error/src/TraceError.d.ts:77:16 - error TS2425: Class 'Exception' defines instance member property 'cause', but extended class 'TraceError' defines it as instance member function.

77         public cause(index?: number): Error | undefined;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions