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