Closed
Description
var paragraphs = document.querySelectorAll("p");
for (let p of paragraphs) {
console.log(p);
}
foo.ts(2,15): error TS2495: Type 'NodeList' is not an array type or a string type.
Is it because the standard emit will have the wrong behavior for live lists that are modified during iteration? A [].slice.call()
in the emit would fix that, but perhaps that detracts from wanting to keep the output as close to the original as possible...