TypeScript Version: 2.1.1
classBaseErrorextendsError{}classError1extendsBaseError{}leterror=newError1();console.log(errorinstanceofError1);Expected behavior:
prints true.
Actual behavior:
prints false.
Note:
This happens only when a type extends Error.
After removing extends Error from BaseError everything works as expected.
Links
Test case
TypeScript Version: 2.1.1
Expected behavior:
prints
true.Actual behavior:
prints
false.Note:
This happens only when a type extends
Error.After removing
extends Errorfrom BaseError everything works as expected.Links
Test case