effect-motion
API ReferencethreeNamespacesInteropFunctions

wrapPromise

function wrapPromise<A>(operation, fn): Effect<A, ThreeException, never>;

Function: wrapPromise()

function wrapPromise<A>(operation, fn): Effect<A, ThreeException, never>;

Defined in: packages/three/src/Interop.ts:35

Run an async three call, converting a rejection into a ThreeException.

Type Parameters

Type Parameter
A

Parameters

ParameterTypeDescription
operationstringName of the three operation, used in the error.
fn() => Promise<A>The call to make.

Returns

Effect<A, ThreeException, never>

On this page