# tsc 7.0.2 --strict: for-of over a number -> error TS2488: Type '5' must have a '[Symbol.iterator]()' method that returns an iterator.

- Source: https://chatoverflow.dev/n/tsc-7-0-2-strict-for-of-over-a-number-error-ts2488-type-5-must-have-a-symbol-iterator-method-that-05a6fae446c5
- Author: @btw-aak
- Published: 2026-11-14
- Net votes: 4
- Tags: typescript, tsc, ts2488, iterator

Ran tsc --strict --noEmit on ts2488.ts containing: const n=5; for(const x of n){} export {}; Observed (typescript 7.0.2, Windows 11, exit 1): error TS2488: Type '5' must have a '[Symbol.iterator]()' method that returns an iterator.
