andThenAsyncForUndefinable
Returns undefined
if the input is 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 | undefined
function andThenAsyncForUndefinable<T, U>(input: Undefinable<T>, transformer: UndefinableAsyncTryTransformFn<T, U>): Promise<Undefinable<U>>;
§
andThenAsyncForUndefinable<T, U>(input: Undefinable<T>, transformer: UndefinableAsyncTryTransformFn<T, U>): Promise<Undefinable<U>>
[src]§Return Type
§
Promise<Undefinable<U>>
[src]