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

§Functions

andThenAsyncForNullable

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

andThenForNullable

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

expectNotNull

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

inspectNullable
  • 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 null.
isNotNull
isNull
mapAsyncForNullable

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

mapForNullable

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

mapOrAsyncForNullable

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

mapOrElseAsyncForNullable

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

mapOrElseForNullable

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

mapOrForNullable

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

okOrElseAsyncForNullable

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

okOrElseForNullable

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

okOrForNullable

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

orElseAsyncForNullable

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

orElseForNullable

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

toResultErrFromNullable

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

toResultOkFromNullable

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

toUndefinableFromNullable

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

unwrapNullable

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

unwrapOrElseAsyncForNullable

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

unwrapOrElseForNullable

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

unwrapOrForNullable

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

§Type Aliases

NotNull
Nullable