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

okOrElseForPlainOption

Transforms the Option<T> into a Result<T, E>, mapping Some(v) to Ok(v) and None to Err(err()).

function okOrElseForPlainOption<T, E>(input: Option<T>, recoverer: RecoveryFn<E>): Result<T, E>;
§
okOrElseForPlainOption<T, E>(input: Option<T>, recoverer: RecoveryFn<E>): Result<T, E>
[src]

§Type Parameters

§Parameters

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

§Return Type

§
Result<T, E>
[src]