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

unwrapOrElseForNullable

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

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

§Type Parameters

§Parameters

§
input: Nullable<T>
[src]
§
recoverer: RecoveryFn<NotNull<T>>
[src]

§Return Type