Closed
Description
I was able to dig up a lot of discussion about why myArray[i]
should not be a nullable type, and that makes sense. But I wasn't able to dig up anything on for ... of
loops.
How come the following:
const x = ["a", "b"]
for (const y of x) { /* ... */ }
makes y
a nullable type? All the arguments saying myArray[i]
shouldn't be a nullable type also seem to apply to for ... of
loops, as far as I can see.