Using Generator Syntax in TypeScript with Effect.gen

Hey there, I just discovered I can use this kind of syntax and use it inside another
Effect.gen

const hasSomething = function*() {
  const count = yield* Effect.succeed(1)
  return count > 0
}

Here's a play link to highlight this > https://effect.website/play#2e5143e5975c
I wonder how typescript is still happy with this 🤔
Was this page helpful?