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

mapOrElseAsyncForOption

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

function mapOrElseAsyncForOption<T, U>(
input: Option<T>,
recoverer: AsyncRecoveryFn<U>,
transformer: AsyncTransformFn<T, U>,
): Promise<U>;
§
mapOrElseAsyncForOption<T, U>(input: Option<T>, recoverer: AsyncRecoveryFn<U>, transformer: AsyncTransformFn<T, U>): Promise<U>
[src]

§Type Parameters

§Parameters

§
input: Option<T>
[src]
§
recoverer: AsyncRecoveryFn<U>
[src]
§
transformer: AsyncTransformFn<T, U>
[src]

§Return Type

§
Promise<U>
[src]