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

mapAsyncForOption

Maps a Option<T> to Option<U> by applying a transformer function to an contained Some(T) value, leaving an None value untouched.

This function can be used to compose the results of two functions.

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

§Type Parameters

§Parameters

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

§Return Type

§
Promise<Option<U>>
[src]