-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
fix(cli/js/error_stack): Expose Error.captureStackTrace #5254
Conversation
Not super sure if we should expose it as part of the type? Since it is technically a non-standard v8 only feature |
Maybe... but nothing in https://v8.dev/docs/stack-trace-api suggests that this is for internal runtime use only -- in fact it makes lots of references to "user scripts". Unless Deno has a special reason to override this we should just let it pass through IMO. Couple this with the fact that users do seem to be using this API, and that it will continue to exist in JS, not supporting it in TS just seems like a stumbling block. |
I agree with @nayeemrmn. Deno is tightly coupled to V8, that means non-spec APIs supported by V8 are candidates for inclusion in Deno type definitions. For reference, |
0e34d7f
to
5612cd8
Compare
@nayeemrmn please merge with |
Fixes #5127.
Closes #5251.
Closes #4702.
Ref https://v8.dev/docs/stack-trace-api#stack-trace-collection-for-custom-exceptions.