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

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

Open
taschmidt opened this issue Apr 1, 2024 · 1 comment

Comments

@taschmidt
Copy link

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;
@taschmidt
Copy link
Author

Ok, it looks like ES2022 may render this lib obsolete: https://stackoverflow.com/a/42755876/909921

May want to update the docs to reflect this?

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

No branches or pull requests

1 participant