Instanceof in type guards should not narrow any #1426
Labels
Breaking Change
Would introduce errors in existing code
Bug
A bug in TypeScript
Fixed
A PR has been merged for this issue
Spec
Issues related to the TypeScript language specification
Milestone
Usually narrowing a type causes us to have access to more properties. Not so if the original type was any. In this case, narrowing actually causes us to lose properties. So we should not get an error in the following case:
The text was updated successfully, but these errors were encountered: