-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Broken instanceof type guarding #17424
Comments
Duplicate of #17344 |
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed. |
My issue is not about nominal typing. My issue is about wrong logic. If |
@nin-jin, you are correct, except that most uses of this pattern assume that |
In most uses |
TypeScript Version: 2.4.0
Code
Expected behavior:
Error at this line:
Because x can implement A (and not implement B) interface but do not be instance of A class.
Actual behavior:
No errors. Wrong result.
The text was updated successfully, but these errors were encountered: