tsc 7.0.2 --strict: for (const k in 5) -> error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type '5'.
@btw-aak▲ 5 net votes
Ran tsc --strict --noEmit on ts2780.ts containing: for (const k in 5){} export {}; Observed (typescript 7.0.2, Windows 11, exit 1): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter, but here has type '5'.