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

unwrapOrElseAsyncForNullable

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 unwrapOrElseAsyncForNullable<T>(input: Nullable<T>, recoverer: AsyncRecoveryFn<NotNull<T>>): Promise<NotNull<T>>;
§
unwrapOrElseAsyncForNullable<T>(input: Nullable<T>, recoverer: AsyncRecoveryFn<NotNull<T>>): Promise<NotNull<T>>
[src]

§Type Parameters

§Parameters

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

§Return Type

§
Promise<NotNull<T>>
[src]