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

andThenAsyncForNullable

Returns null if the input is null, 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

function andThenAsyncForNullable<T, U>(input: Nullable<T>, transformer: NullableAsyncTryTransformFn<T, U>): Promise<Nullable<U>>;
§
andThenAsyncForNullable<T, U>(input: Nullable<T>, transformer: NullableAsyncTryTransformFn<T, U>): Promise<Nullable<U>>
[src]

§Type Parameters

§Parameters

§
input: Nullable<T>
[src]
§
transformer: NullableAsyncTryTransformFn<T, U>
[src]

§Return Type

§
Promise<Nullable<U>>
[src]