Skip to content

TypeScript API / contentia/core / ContentiaTask / fromEffect

Function: fromEffect() ​

ts
function fromEffect<A, R>(eff): ContentiaTask<A, R>;

Lift an Effect producing a value (and optional recoverable errors) into a ContentiaTask.

Type Parameters ​

Type ParameterDefault type
A-
Rnever

Parameters ​

ParameterType
effEffect<{ recoverableErrors?: readonly ContentiaError<ErrorCode, number>[]; value: A; }, ContentiaError<ErrorCode, number>, R>

Returns ​

ContentiaTask<A, R>