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

mapForNullable

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 mapForNullable<T, U>(input: Nullable<T>, transformer: TransformFn<T, NotNull<U>>): Nullable<U>;
§
mapForNullable<T, U>(input: Nullable<T>, transformer: TransformFn<T, NotNull<U>>): Nullable<U>
[src]

§Type Parameters

§Parameters

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

§Return Type