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

transposeResultToUndefinable

Transposes a Result of an Undefinable<T> into an Undefinable<T> of a Result.

  • Ok(T) -> Ok(T)
  • Ok(undefined) -> undefined
  • Err(E) -> Err(E)
function transposeResultToUndefinable<T, E>(input: Result<Undefinable<T>, E>): Undefinable<Result<T, E>>;
§
transposeResultToUndefinable<T, E>(input: Result<Undefinable<T>, E>): Undefinable<Result<T, E>>
[src]

§Type Parameters

§Parameters

§
input: Result<Undefinable<T>, E>
[src]

§Return Type

§
Undefinable<Result<T, E>>
[src]