-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Property 'captureStackTrace' does not exist on type 'ErrorConstructor'. #3926
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
Comments
@Mamsaac : did you resolve this? Why was this issue closed? |
interface ErrorConstructor {
captureStackTrace(thisArg: any, func: any): void
} |
That should probably be added to |
yes, see documentation: https://nodejs.org/api/errors.html#errors_error_capturestacktrace_targetobject_constructoropt |
@DanielRosenwasser Did this land in the node types? Not working for me. |
@amcdnl @Mamsaac This helped - #1168 (comment) |
I couldn't find more information on this bug by googling, so I will assume this is rather unusual.
While this doesn't ruin the compiling (thank you for that well thought design of "ignoring" errors when emitting), it is mostly an aesthetic issue.
I was porting the nodejs assert module to be an internal module, so that I can use it with other internal modules for testing purposes. Anyway, I wrote the following:
It gives me the error:
assert.ts(102,13): error TS2339: Property 'captureStackTrace' does not exist on type 'ErrorConstructor'.
I noticed that supporting implementing types such as Error and other ES-6 specific types was added recently. I don't know enough about TypeScript internals to help with a PR.
Thanks for your time and help.
The text was updated successfully, but these errors were encountered: