TypeScript async/await vs JS tj/co

564 views Asked by At

Do I understand correctly that I do not need to use libs like tj/co in TypeScript to control flow, since I can use async/await? Using promises with generators is just a workaround for async/await?

1

There are 1 answers

0
Bergi On BEST ANSWER

I do not need to use libs like tj/co in TypeScript to control flow, since I can use async/await?

Yes.

Using promises with generators is just a workaround for async/await?

Yes. Generators and async runners were used in ES6 to emulate async/await and get the syntactic sugar everyone longed for. Now with ES8 you can await your promises directly.