Closed as not planned
Description
π Search Terms
keyof any string
π Version & Regression Information
Tested in the playground on "v3.3.3333" and "Nightly", it occurs in both versions
β― Playground Link
π» Code
type Obj = { [k in keyof any]: number }
// ^? type Obj = { [x: string]: number; }
type Keys = keyof Obj;
// ^? type Keys = string | number | symbol
declare const obj: Obj;
obj[Symbol.iterator] // (This breaks)
π Actual behavior
The Obj
type allows indexing only with strings
π Expected behavior
The Obj
type should allow indexing with every type of property key
Additional information about the issue
No response