Re:TypeScript Won
by woah on Wednesday April 27, 2016 @11:48AM
(#11581489)
Have you tried a async/await?
[ Parent
| on HN ]
async/await isn't in TypeScript yet, if that's what you were implying. It will be though (and obviously is part of babel if you choose the right pieces).
async/await has been in TypeScript for a while, but currently depend on generators, so don't down-level to <= ES5 emit (that work is in progress).
With the latest Node releases and modern browsers supporting generators today, you can target ES6 and use async/await today if you can target those environments.
https://blogs.msdn.microsoft.com/typescript/2015/11/03/what-...