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