any
appears to shortcircut structural type checking
#31295
Labels
Bug
A bug in TypeScript
Domain: Conditional Types
The issue relates to conditional types
Domain: Variance Relationships
The issue relates to variance relationships between types
Milestone
TypeScript Version: 3.5.0-dev.20190507
Search Terms:
any, unsound, extends, never
Code
Expected behavior:
Either
bar.prop
should have the type"isAny"|"isNotAny"
orfoo
should not be assignable tobar
.Actual behavior:
foo
is assignable tobar
andbar.prop
has the type"isAny"
which is incompatible withfoo.prop
's"isNotAny"
.Playground Link: link
The text was updated successfully, but these errors were encountered: