Yielded value type.
Return value type.
Error type (default: unknown).
Returns a promise that resolves with the channel's return value, or rejects with its error. Repeated calls return the same promise without consuming buffered events.
Subscribes to all events (yield, return, and throw) as they arrive.
Immediately flushes any already-buffered events to callback, then
continues to deliver new events in order.
Callbacks run synchronously and are not awaited. A throwing callback is
detached: during replay its exception propagates from this call; for new
events, all pending consumers are notified before the producer receives
the first callback exception. Channel completion and errors are unaffected.
Bidirectional async channel combining AsyncSink and AsyncSource.
Provides a write-side for pushing values and a read-side for consuming them via async iteration or event callbacks.
Example