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

§Functions

andThenAsyncForUndefinable

Returns undefined if the input is undefined, otherwise calls transformer with the value and returns the result.

andThenForUndefinable

Returns undefined if the input is undefined, otherwise calls transformer with the value and returns the result.

expectNotUndefined

Return input as T if the passed input is not undefined. Otherwise, throw TypeError with the passed msg.

inspectUndefinable
  • Return input directly.
    • This value is passed as the input. But it maybe mutated by calling effector.
  • Call effector with input if input is not undefined.
isNotUndefined
isUndefined
mapAsyncForUndefinable

Return the result of transformer with using input as an argument for it if input is not undefined, Otherwise, return undefined.

mapForUndefinable

Return the result of transformer with using input as an argument for it if input is not undefined, Otherwise, return undefined.

mapOrAsyncForUndefinable

Return the result of transformer with using input as an argument for it if input is not undefined. Otherwise, return defaultValue.

mapOrElseAsyncForUndefinable

Return the result of transformer with using input as an argument for it if input is not undefined. Otherwise, return the result of recoverer.

mapOrElseForUndefinable

Return the result of transformer with using input as an argument for it if input is not undefined. Otherwise, return the result of recoverer.

mapOrForUndefinable

Return the result of transformer with using input as an argument for it if input is not undefined. Otherwise, return defaultValue.

okOrElseAsyncForUndefinable

Transforms the Undefinable<T> into a Result<T, E> by mapping T to Ok(T). If input is undefined, then returns Err(E) with the result of recoverer()

okOrElseForUndefinable

Transforms the Undefinable<T> into a Result<T, E> by mapping T to Ok(T). If input is undefined, then returns Err(E) with the result of recoverer()

okOrForUndefinable

Transforms the Undefinable<T> into a Result<T, E> by mapping T to Ok(T). If input is undefined, then return Err(E) with passed err.

orElseAsyncForUndefinable

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

orElseForUndefinable

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

toNullableFromUndefinable

Return null if input is undfined. Otherwise, return T directly.

toResultErrFromUndefinable

Return Ok<void> if input is undefinable. Otherwise, return Err<E> directly.

toResultOkFromUndefinable

Return Err<void> if input is undefinable. Otherwise, return Ok<T> directly.

unwrapOrElseAsyncForUndefinable

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

unwrapOrElseForUndefinable

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

unwrapOrForUndefinable

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

unwrapUndefinable

Return input as T if the passed input is not undefined. Otherwise, throw TypeError.

§Type Aliases

NotUndefined
Undefinable