Skip to content

TypeScript API / contentia/core / ContentiaTask / drainWithValue

Function: drainWithValue() ​

ts
function drainWithValue<A, R>(self, onChunk): Effect<A, ContentiaError<ErrorCode, number>, R>;

Low-level: drain a ContentiaTask invoking onChunk per chunk; return the resolved value (Channel's OutDone).

Type Parameters ​

Type Parameter
A
R

Parameters ​

ParameterType
selfContentiaTask<A, R>
onChunk(chunk) => Effect<void>

Returns ​

Effect<A, ContentiaError<ErrorCode, number>, R>