-
Notifications
You must be signed in to change notification settings - Fork 421
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
Not all interfaces should be marked as constructable #1162
Comments
This is because interface Foo {}
declare var Foo: {
prototype: Foo;
new(): never;
};
let foo = {} as Foo;
if (foo instanceof Foo) {
foo // $Foo
} @orta does |
We bounced the idea back and forth a bit, and generally think this is more likely to cause more breakages than it cures 👍🏻 |
What breakages for example? |
This also affects Maybe it's worth putting in a |
Sounds good to me but I wonder what TS team thinks about the suggestion, maybe @DanielRosenwasser? |
I just ran into this issue. Adding What do you think, @DanielRosenwasser? |
@sandersn Do you some context around #1162 (comment) ? |
E.g. trying to call
AbortSignal
with new throwsIllegal constructor
error.This is not currently handled by the declaration:
The text was updated successfully, but these errors were encountered: