-
-
Notifications
You must be signed in to change notification settings - Fork 540
(new CustomError) instanceof CustomError => false #833
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
I think this may be related to your target ES version, but I’ll investigate more when I have a chance. Are you specifying a custom target at all? |
I was having a similar issue, narrowed it down to nodejs itself! Might be relevant nodejs/node#27859 ? |
@blakeembrey Thank you for your reply! I'm sorry I didn't notice. Actually I didn't understand what you mean, but I tried target ES versions (es5, es2015, es2018), and got same result. With following configuration
With following configuration also same result
|
@iam4x Thank you for your reply! Since I got expected result @ |
In my case changing target from Also take a look at this issue microsoft/TypeScript#10166 |
Thanks @davoam, I'm going to close this issue since it's most likely related to emitted output. It's a reason I've always used something like https://www.npmjs.com/package/make-error in custom projects. |
Maybe related to #583
In addition,
constructor
also works unexpectedly.I've tested using following code.
Adding
constructor
in class did not change result.The text was updated successfully, but these errors were encountered: