Write-side of an async channel that pushes values, completion, or errors.
declare const sink: AsyncSink<number, string>;sink.next(1);sink.next(2);sink.complete("done"); Copy
declare const sink: AsyncSink<number, string>;sink.next(1);sink.next(2);sink.complete("done");
Yielded value type.
Return value type.
Error type (default: unknown).
unknown
Completes the channel with a return value.
The argument is optional when R is void or undefined.
R
void
undefined
Terminates the channel with an error.
Pushes a yielded value into the channel.
Write-side of an async channel that pushes values, completion, or errors.
See
Example