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
It would be handy if TS will use values of const enum literals when deriving element type.
type T = [number, string]
const enum Idx {
Num, Str
}
var t: T = [0, '1']
var x = t.shift()
var y = t[Idx.Num] // expect number type but got string | number
var z = t[Idx.Str] // expect string type but got string | number
The text was updated successfully, but these errors were encountered:
It would be handy if TS will use values of const enum literals when deriving element type.
The text was updated successfully, but these errors were encountered: