You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A type predicate's type must be assignable to its parameter's type.
Type 'TaggedRecord[T]' is not assignable to type 'TaggedRecord[keyof TaggedRecord]'.
The text was updated successfully, but these errors were encountered:
Caused by #17912. Before that, the assignability was not checked at all; the constraint of both types was incorrectly any. Now, neither type has a constraint, so they are incorrectly not assignable. Turns out our assignability rules for indexed access types are incomplete.
I'll put up a PR after lunch; I need to write some more tests.
TypeScript Version: 2.7.0-dev.20180113
Code
This type operator from the Unionize library:
Expected behavior:
Should compile, and does in
[email protected]
.Actual behavior:
Fails to compile in
typescript@next
withThe text was updated successfully, but these errors were encountered: