5 ms·
Relatedly, I'm increasingly surprised how many people still think they need a transpiler for ES2015-ES2018. Browser adoption for them has been much faster than
by WorldMaker 8y ago
Relatedly, I'm increasingly surprised how many people still think they need a transpiler for ES2015-ES2018. Browser adoption for them has been much faster than the once problematic ES3 to ES5 upgrade.
Especially for those that use the common suggestion for Babel of "last 2 versions of major browsers" presets, the amount of transpiled code has gotten extremely small, and increasingly so.
For example:
Arrow functions: https://caniuse.com/#feat=arrow-functions https://caniuse.com/#feat=arrow-functions
ES2015 classes: https://caniuse.com/#feat=es6-class https://caniuse.com/#feat=es6-class
Async/await: https://caniuse.com/#feat=async-functions https://caniuse.com/#feat=async-functions
ES2015 modules: https://caniuse.com/#feat=es6-module https://caniuse.com/#feat=es6-module
«There are some coding styles that are popular in esnext that just aren’t practical in es5 because they would be too verbose and not “read” very well.»
I like to check my code after downleveling in Typescript to ES5 from time to time. There isn't anything in ES2015-ES2018 that downlevels to "unreadable" in Typescript. The "worst" you get is async/await transpiles to ES2015 generators of promises (function*) which then transpiles to ES5 switch/case state machines, but even with all of that downlevel work I think you'd be surprised at how readable it stays.