Ensuring TypeScript Recognizes Non-Undefined Returns in Generator Functions
How are you supposed to tell typescript that your generator function can't return
undefined
undefined
? With normal functions you would throw errors, which typescript understands as short cirtuiting, but with Effect you're yielding them, and typescript has no idea that will short cirtuit