-
-
Notifications
You must be signed in to change notification settings - Fork 88
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
Add types
#52
Comments
It should be 100% doable in most cases, i have tons of npm packages to handle most of them in a cross-realm way. https://npmjs.com/~inspect-js |
Oh, nice! I'm specifically after a an error check as we gave a bunch of ugly duck typing in Jest to figure out if we have an error instance or not. But I'm hesitant to add Do you have a package for |
No, unfortunately there is no JavaScript way to robustly identify a native Error - |
https://nodejs.org/api/util.html#util_util_types
They work cross-realm (at least for
Error
coming from a newvm.Context
). Not sure if it's worth it for you to work cross-realm, but just doinginstanceof
should work OK as a shim, think?The text was updated successfully, but these errors were encountered: