TypeScript docs say nothing about loop like for
or for-in
. From playing with the language it seems that only any
or string
variables are supported in for
loop.
Why has this decision been made?
Why not use the type information and have strongly-typed iteration variable?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…