5 ms·
I heartily recommend TypeScript as an ES6 compiler with excellent support for commenting types used.
by ludamad 11y ago
I heartily recommend TypeScript as an ES6 compiler with excellent support for commenting types used.
- andrewstuart 11y agoI note that https://jaxenter.com/typescript-1-7-122642.html https://jaxenter.com/typescript-1-7-122642.html "TypeScript 1.7 is here with async/await as default for ES6" makes a point of saying "as default". Nice to hear. I'm now going to attempt to switch to TypeScript. I wonder how deep this new rabbit hole will be.....
- smithkl42 11y agoTypeScript is awesome. Highly recommended. Can't imagine doing JS coding without it.
- PeCaN 11y agoRabbit hole never ends, but your sanity will thank you for it.
- thejameskyle 11y agoYou should, TypeScript is great and you'll get what you want out of it.
- ludamad 11y agoNote 'for ES6'. This is a fairly large caveat, as it requires you to have a way to deal with the emitted ES6 code. The problem being that TypeScript does not currently down-emit generators. Strictly speaking, TypeScript provides excellent down-emit support for a subset of ES6, and the rest of ES6 support such as 'let' captured in closures and generators need another compiler to down-emit the generated ES6 (for now).
- WorldMaker 11y agoThere's definitely still cases where you want some subset of Babel or CoreJS polyfills AND Typescript. The magic may be in Typescript helping you figure out which runtime polyfills to configure, maybe even spit out something resembling a .babelrc for your Typescript project. There's definitely discussions on this topic in the GitHub Issues, though I haven't perused them recently so I can't tell you right now if there is any progress.