Hacker News new | ask | show | jobs
by 1_player 3205 days ago
From what I understand, TypeScript doesn't do any transpiling, so if you want to use ES6/2017 features, you're going to need Babel.

(I haven't used TypeScript yet, so I might be wrong)

2 comments

Typescript has always transpiled to ES5 (by default it transpiles to ES3 actually). See: https://stackoverflow.com/questions/41173215/does-typescript...

The only counter-example that I know of is that async/await were initially only supported when transpiling to ES6, but this is not true since at least 2.2 (https://github.com/Microsoft/TypeScript/issues/5210).

It does transpiling. You can set the compiler target to es3/es5/es6 in your tsconfig.json and then you don't need Babel.