TypeScript API / contentia/core / ContentiaStream / drainWithDone
Function: drainWithDone()
ts
function drainWithDone<A, D, R>(self, onChunk): Effect<D, ContentiaError<ErrorCode, number>, R>;Drain a ContentiaStream, invoking onChunk for every chunk, and return the typed done value the stream terminates with.
Type Parameters
| Type Parameter |
|---|
A |
D extends ContentiaDone |
R |
Parameters
| Parameter | Type |
|---|---|
self | ContentiaStream<A, D, R> |
onChunk | (chunk) => Effect<void> |
Returns
Effect<D, ContentiaError<ErrorCode, number>, R>