3 ms·
Thanks for your suggestions. One question: why use Babel at all if TypeScript offers type safety and ES6 conversion? Or does Babel have some other "killer featu
by applecrazy 10y ago
Thanks for your suggestions. One question: why use Babel at all if TypeScript offers type safety and ES6 conversion? Or does Babel have some other "killer feature" that makes it useful in a TypeScript project?
- ohstopitu 10y agoif you use TS, you don't really need Babel at all. However, if you don't (I used TS, it was great, but I had some weird issues so I moved back to JS), Babel is awesome! I just use Babel (with gulp - backend or webpack - frontend) and use just one preset - babel-preset-latest and never worry about ES(x). Not because ES(x) is not important, but because if you keep reading more and more features, you'll get stuck on just those. ES(x) should be more natural... As an example, a function in ES5 would be along the lines of function () { //your_stuff_here } but in ES6 it's more like () => { //your_stuff_here } which is a lot less typing. Also, I'd advice you to use ESlint from the very beginning as it helps you maintain a good coding style from the start.