Re:Announcing TypeScript 2.0
by kimsk112 on Thursday September 22, 2016 @12:53PM
(#12558201)
Have you tried transpiling to ES6 and then use Babel?
[ Parent
| on HN ]
Re:Announcing TypeScript 2.0
by saosebastiao on Thursday September 22, 2016 @01:09PM
(#12558340)
I've gone that route for a while now. It's a nightmare of fragility in your build, not to mention little things like how it totally kills your sourcemaps. I just upgraded to typescript@next and it has been a dream. I eliminated like 50% of the cruft around my build just by doing that.
It's "yet another 'transpilation(?!)' step". I currently use this combination but I would be way happier with just Typescript as in the current config the lag becomes noticeable.
If you use webpack, you could just add ts-loader as a first loader and babel-loader as a second one. Source-map works great too.
Re:Announcing TypeScript 2.0
by johnny_reilly on Friday September 23, 2016 @03:04AM
(#12562843)
Yup - though you need to make use of lib if you want to write es2016 TypeScript and have Babel transpile it. Not too hard to get set up though:
http://blog.johnnyreilly.com/2016/09/typescript-20-es2016-an...
before typescript@next I had exactlt that setup, but sourcemaps were broken despite all my attempts to make them work. Now I'm using ts 2.1 and have completely removed babel out of my build.