yortus / asyncawait

Callback heaven for Node.js with async/await
MIT License
1.91k stars 77 forks source link

Examples in typescript #72

Open rajjaiswalsaumya opened 5 years ago

rajjaiswalsaumya commented 5 years ago

I dont get how https://github.com/yortus/asyncawait/issues/13 is in typescript. Can you add concrete examples in typescript for basic.

I cant use javascript syntax such as var. For me await does not work. I am calling an api and trying to await for promise resolution.

yortus commented 5 years ago

Hi @rajjaiswalsaumya, these days you shouldn't need to use this library for basic scenarios like in #13. TypeScript and JavaScript have native async/await syntax built in to the language now. Even if you are using an environment where native async/await are not supported, TypeScript will downlevel it to equivalent ES5 code for you.

If you are still having trouble, can you post some sample code showing the problem you're having?