4 ms·
In what way have you found Babel to be a better translator?
by sbjs 8y ago
In what way have you found Babel to be a better translator?
- nothrabannosir 8y agoSupport of features, maturity, etc. “Do one thing and do it well” applies. Have a look at the Babel website. There are tons of plugins and features: generators, symbols, async generators , object spread (long before TS had it), ......... Then there is automatic tracking of what is supported by your runtime , e.g. you can say “use polyfills for anything not supported by the current version of node”. .babelrc is a complex beast, because polyfilling is complex. Let Babel solve that, and focus your TS energy on typechecking.
- sbjs 8y agoYou're actually arguing against your own point. "Do one thing and do it well" is a great philosophy, and TypeScript actually does that more than Babel does. Babel does translation and polyfill, TypeScript only does translation. Type checking is only done during the translation phase for both tools (using Flow for Babel). So I would say TypeScript is cleaner and simpler in that regard.