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

mapForMaybe

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 be Maybe<*>.
    • If you'd like return Maybe<*> as U, use andThen().
    • If the result of transformer is null or undefined, this throw an Error.
function mapForMaybe<T, U>(input: Maybe<T>, transformer: TransformFn<T, NotNullOrUndefined<U>>): Maybe<U>;
§
mapForMaybe<T, U>(input: Maybe<T>, transformer: TransformFn<T, NotNullOrUndefined<U>>): Maybe<U>
[src]

§Type Parameters

§Parameters

§
input: Maybe<T>
[src]
§
transformer: TransformFn<T, NotNullOrUndefined<U>>
[src]

§Return Type