DEV Community


Discussion on: Generators in Typescript

jwp profile image
John Peters

Nice post, a few years back I was interested in how Async/Await worked. Found out it uses generators, in same manner you describe in this article.

If we look into the Async/Await code we see the yields which also allow for an instruction interop, this is the asynchronous part yielding to other work to be done.

Similar to hardware interrupts, which give the run a chance to breath and time slice something else. The good news is we don't have to write that part we just use async/await!

Your article on Async/Await was good too.

gsarciotto profile image
Giovanni Sarciotto Author


Yeah, async/await was a wonderful addition to the language, so simple to use yet so powerful.