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

unwrapOrElseForMaybe

Return input as T if the passed input is not null and undefined. Otherwise, return the result of recoverer.

  • The result of recoverer must not be Maybe<*>.
  • If the result of recoverer is null or undefined, throw TypeError.
function unwrapOrElseForMaybe<T>(input: Maybe<T>, recoverer: RecoveryFn<NotNullOrUndefined<T>>): NotNullOrUndefined<T>;
§
unwrapOrElseForMaybe<T>(input: Maybe<T>, recoverer: RecoveryFn<NotNullOrUndefined<T>>): NotNullOrUndefined<T>
[src]

§Type Parameters

§Parameters

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