okOrElseAsyncForUndefinable
Transforms the Undefinable<T>
into a Result<T, E>
by mapping T
to Ok(T)
.
If input
is undefined
, then returns Err(E)
with the result of recoverer()
function okOrElseAsyncForUndefinable<T, E>(input: Undefinable<T>, recoverer: AsyncRecoveryFn<E>): Promise<Result<T, E>>;