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