For instance:
let myList = [];
for (let item of myList) {
...
}
After being transpiled:
var myList = [];
for (var _i = 0, myList_1 = myList; _i < myList_1.length; _i++) {
var item = myList_1[_i];
}
Why is myList_1
necessary in this case?
You can test this out for yourself on the Typescript playground here.