4 ms·
Have you tried a async/await?
by woah 11y ago
Have you tried a async/await?
- softawre 11y agoasync/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).
- billti 11y agoasync/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-about-asyncawait/ https://blogs.msdn.microsoft.com/typescript/2015/11/03/what-...