mapAsyncForMaybe
Return the result of transformer with using input as an argument for it if input is not null
and undefined
.
Otherwise, return null
or undefined
inputted as input.
U
must not beMaybe<*>
.- If you'd like return
Maybe<*>
asU
, useandThen()
. - If the result of transformer is
null
orundefined
, this throw anError
.
- If you'd like return
function mapAsyncForMaybe<T, U>(input: Maybe<T>, transformer: AsyncTransformFn<T, NotNullOrUndefined<U>>): Promise<Maybe<U>>;