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

unwrapOrElseForResult

Unwraps a result input, returns the content of an Ok(T). If the value is an Err(E) then it calls def with its value.

function unwrapOrElseForResult<T, E>(input: Result<T, E>, recoverer: RecoveryFromErrorFn<E, T>): T;
§
unwrapOrElseForResult<T, E>(input: Result<T, E>, recoverer: RecoveryFromErrorFn<E, T>): T
[src]

§Type Parameters

§Parameters

§
input: Result<T, E>
[src]
§
recoverer: RecoveryFromErrorFn<E, T>
[src]

§Return Type