Package: effect
Module: Channel
Creates a channel that pulls values from an AsyncIterable.
Details
Each yielded value is emitted as an output element. The iterator’s return
value becomes the channel’s done value. Thrown or rejected iterator errors
are converted with onError. If the channel scope closes early and the
iterator has a return method, that method is called.
Signature
declare const fromAsyncIterable: <A, D, E>(iterable: AsyncIterable<A, D>, onError: (error: unknown) => E) => Channel<A, E, D>
Since v4.0.0