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

unwrapOrForUndefinable

Return input as T if the passed input is not undefined. Otherwise, return defaultValue.

  • defaultValue must not be Undefinable<*>.
  • If the result of defaultValue is undefined, throw TypeError.
function unwrapOrForUndefinable<T>(input: Undefinable<T>, defaultValue: NotUndefined<T>): NotUndefined<T>;
§
unwrapOrForUndefinable<T>(input: Undefinable<T>, defaultValue: NotUndefined<T>): NotUndefined<T>
[src]

§Type Parameters

§Parameters

§
defaultValue: NotUndefined<T>
[src]

§Return Type