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

mapAsyncForNullable

Return the result of transformer with using input as an argument for it if input is not null, Otherwise, return null.

  • U must not be Nullable<*>.
    • If you'd like return Nullable<*> as U, use andThen().
    • If the result of transformer is null, this throw an Error.
function mapAsyncForNullable<T, U>(input: Nullable<T>, transformer: AsyncTransformFn<T, NotNull<U>>): Promise<Nullable<U>>;
§
mapAsyncForNullable<T, U>(input: Nullable<T>, transformer: AsyncTransformFn<T, NotNull<U>>): Promise<Nullable<U>>
[src]

§Type Parameters

§Parameters

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

§Return Type

§
Promise<Nullable<U>>
[src]