Function asyncFailure

  • const failureResult = await asyncFailure('some failure').mapErr(value => value + ', another failure');
    failureResult.orNull(); // produces: null
    failureResult.failureOrElse('Not this'); // produces: "some failure, another failure"

    Type Parameters

    • S
    • F

    Parameters

    • value: F

    Returns Async<S, F>