const failureResult = asyncFailure('some failure').or(reason => asyncFailure(reason + ', another failure'));await failureResult.orNull(); // produces: nullawait failureResult.orElse('Not this'); // produces: "Not this" (orElse returns the fallback for a failure) Copy
const failureResult = asyncFailure('some failure').or(reason => asyncFailure(reason + ', another failure'));await failureResult.orNull(); // produces: nullawait failureResult.orElse('Not this'); // produces: "Not this" (orElse returns the fallback for a failure)