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

andThenAsyncForMaybe

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

XXX: Some languages call this operation flatmap. But we don't provide flatMap() as alias of this function. because it's too hard to undarstand that "flatMap" operation for T | null | undefined.

function andThenAsyncForMaybe<T, U>(input: Maybe<T>, transformer: MaybeAsyncTryTransformFn<T, U>): Promise<Maybe<U>>;
§
andThenAsyncForMaybe<T, U>(input: Maybe<T>, transformer: MaybeAsyncTryTransformFn<T, U>): Promise<Maybe<U>>
[src]

§Type Parameters

§Parameters

§
input: Maybe<T>
[src]
§
transformer: MaybeAsyncTryTransformFn<T, U>
[src]

§Return Type

§
Promise<Maybe<U>>
[src]