Closed
Description
TypeScript Version: 2.1.1 / nightly (2.2.0-dev.201xxxxx)
Code
// A *self-contained* demonstration of the problem follows...
class MyError extends Error {
public code: number;
constructor(code: number, message: string) {
super(message);
this.code = code;
}
}
const e = new MyError(0, "foo");
Expected behavior:
e instanceof MyError === true;
Actual behavior:
e instanceof MyError === false
Note: it was working for ts 2.0.10, but not for ts 2.1.1