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 *self-contained* demonstration of the problem follows...functiontest<Textendsstring|number>(a: T): {[key: T]: boolean}{constmap: {[key: T]: boolean}={};returnmap;}
Expected behavior:
The type system should not complain that the key type of map should be string or number.
Actual behavior:
It gives error that the key of map should be string or number even though T is string or number
The text was updated successfully, but these errors were encountered:
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.
TypeScript Version: 2.4.0 / nightly (2.5.0-dev.201xxxxx)
Code
Expected behavior:
The type system should not complain that the key type of
map
should be string or number.Actual behavior:
It gives error that the key of
map
should bestring or number
even though T is string or numberThe text was updated successfully, but these errors were encountered: