-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
By DesignDeprecated - use "Working as Intended" or "Design Limitation" insteadDeprecated - use "Working as Intended" or "Design Limitation" instead
Description
Wonder if this is something that should work. I think it should:
try {
throw new Error('awesome');
} catch (ex) {
if (ex instanceof Error) {
console.log(ex.foo); // compiles. Should be error
}
}
The reason is that ex
is still of type any
. I suspect its in the spec that instanceof
guard will not work on type any
(I haven't checked).
Would be great if we could have this though.
Metadata
Metadata
Assignees
Labels
By DesignDeprecated - use "Working as Intended" or "Design Limitation" insteadDeprecated - use "Working as Intended" or "Design Limitation" instead