Function failure

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

    Type Parameters

    • ERROR

    Parameters

    Returns Failure<ERROR>