3 ms·
It looks like Typescript also transpiles to a similar try..catch..finally pattern: https://blog.mariusschulz.com/2017/06/30/typescript-2-3-downlevel-iteration-
by zengid 9y ago
It looks like Typescript also transpiles to a similar try..catch..finally pattern:
https://blog.mariusschulz.com/2017/06/30/typescript-2-3-downlevel-iteration-for-es3-es5#the-downleveliteration-flag https://blog.mariusschulz.com/2017/06/30/typescript-2-3-down...
- ChrisSD 9y agoAre you sure? https://www.typescriptlang.org/play/#src=const%20inputs%20%3D%20document.querySelectorAll('input%2C%20select%2C%20textarea')%3B%0D%0Afor%20(let%20input%20of%20inputs)%20%7B%0D%0A%20%20%20%20console.log(input)%3B%0D%0A%7D%0D%0A https://www.typescriptlang.org/play/#src=const%20inputs%20%3...
- zengid 9y ago..with the `--downlevelIteration` flag set and ES5 or ES3 set as the compilation target. I should have clarified. From the article: "TypeScript 2.3 introduced a new `--downlevelIteration` flag that adds full support for the ES2015 iteration protocol for ES3 and ES5 targets. `for...of`-loops can now be downlevel-compiled with correct semantics."