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

unwrapOrElseForUndefinable

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

  • The result of recoverer must not be Undefinable<*>.
    • If you try to recover the value, use orElse()
  • If the result of recoverer is undefined, throw TypeError.
function unwrapOrElseForUndefinable<T>(input: Undefinable<T>, recoverer: RecoveryFn<NotUndefined<T>>): NotUndefined<T>;
§
unwrapOrElseForUndefinable<T>(input: Undefinable<T>, recoverer: RecoveryFn<NotUndefined<T>>): NotUndefined<T>
[src]

§Type Parameters

§Parameters

§
recoverer: RecoveryFn<NotUndefined<T>>
[src]

§Return Type