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

mapForUndefinable

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

  • U must not be Undefinable<*>.
    • If you'd like return Undefinable<*> as U, use andThen().
    • If the result of transformer is undefined, this throw an Error.
function mapForUndefinable<T, U>(input: Undefinable<T>, transformer: TransformFn<T, NotUndefined<U>>): Undefinable<U>;
§
mapForUndefinable<T, U>(input: Undefinable<T>, transformer: TransformFn<T, NotUndefined<U>>): Undefinable<U>
[src]

§Type Parameters

§Parameters

§
transformer: TransformFn<T, NotUndefined<U>>
[src]

§Return Type