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
Queue.offer
in
Effect.fn
Effect.fn
, while other seemingly equivalent invocations (like doing the
yield*
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)})
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)})