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

mapOrElseAsyncForResult

Maps a Result<T, E> to U by applying transformer to a contained Ok(T) value in input, or a recoverer function to a contained Err(E) value in input. This function can be used to unpack a successful result while handling an error.

function mapOrElseAsyncForResult<T, E, U>(
input: Result<T, E>,
recoverer: AsyncRecoveryFromErrorFn<E, U>,
transformer: AsyncTransformFn<T, U>,
): Promise<U>;
§
mapOrElseAsyncForResult<T, E, U>(input: Result<T, E>, recoverer: AsyncRecoveryFromErrorFn<E, U>, transformer: AsyncTransformFn<T, U>): Promise<U>
[src]

§Type Parameters

§Parameters

§
input: Result<T, E>
[src]
§
recoverer: AsyncRecoveryFromErrorFn<E, U>
[src]
§
transformer: AsyncTransformFn<T, U>
[src]

§Return Type

§
Promise<U>
[src]