TypeScript and Generators

Starting in TypeScript 3.6, tsc’s previously “whatever brah” mentality surrounding generators was finally replaced with accurate types. This is nice, because it gets us some extra guarantees at compile time, in particular when dealing with some asynchronous code. But the types of generators can be tricky to grok at first, and in order to understand […]