Re:Announcing TypeScript 1.4
by xxyyzz3d on Friday January 16, 2015 @02:56PM
(#8901268)
Would be quite nice to be able to use 'let', and just use variable renaming to generate ES5 code with unique names in the case where scopes overlap. I guess it might be coming?
[ Parent
| on HN ]
Variable hygiene is not sufficient in loops - you have to make IIFE's for that. Then you have to account that the code inside that IIFE might be referring to the arguments object of the outer function, so you have to forward the outer arguments object to the IIFE as well. It's not impossible but the end result is somewhat gnarly.