Function safeAsyncThrowCall
- safeAsyncThrowCall<L, R>(call, onError?): Promise<Either<L, R> | {
left: {
cause: string;
stack: undefined | string;
type: "unknown-error";
} | L;
tag: "left";
}>
-
Parameters
-
call: (() => Promise<Either<L, R>>)
-
Optional
onError: ((error) => L)
Returns Promise<Either<L, R> | {
left: {
cause: string;
stack: undefined | string;
type: "unknown-error";
} | L;
tag: "left";
}>
Sane as [safeThrowCall] but for an asynchronous callback.