• Sane as [safeThrowCall] but for an asynchronous callback.

    Type Parameters

    Parameters

    • call: (() => Promise<Either<L, R>>)

      the asynchronous callback to execute

    • Optional onError: ((error) => L)

      a callback to transform an internal [Error] in a [TypedError]

        • (error): L
        • Parameters

          • error: Error

          Returns L

    Returns Promise<Either<L, R> | {
        left: {
            cause: string;
            stack: undefined | string;
            type: "unknown-error";
        } | L;
        tag: "left";
    }>

Generated using TypeDoc