Type Narrowing in TypeScript Generator Functions: An Example - Effect Community