Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

okOrElseForMaybe

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 okOrElseForMaybe<T, E>(input: Maybe<T>, recoverer: RecoveryFn<E>): Result<T, E>;
§
okOrElseForMaybe<T, E>(input: Maybe<T>, recoverer: RecoveryFn<E>): Result<T, E>
[src]

§Type Parameters

§Parameters

§
input: Maybe<T>
[src]
§
recoverer: RecoveryFn<E>
[src]

§Return Type

§
Result<T, E>
[src]