Type error when using `Queue.offer` with `Effect.fn` and generic queue

I'm seeing a type error when passing a generic queue to Queue.offer in
Effect.fn
, while other seemingly equivalent invocations (like doing the yield* on a separate line) are allowed. I'm wondering if this is a bug in Effect, the playground, or a limitation of TypeScript.
Effect.fn(function*<T>(queue: Queue.Enqueue<T>, value: T) {
  // Type 'never' must have a '[Symbol.iterator]()' method that returns an iterator.
  yield* Queue.offer(queue, value)
})

This playground demonstrates the non-working scenario along with a bunch of seemingly equivalent scenarios that work.
https://effect.website/play#5c6da130583f
Was this page helpful?