Function allProps

  • Evaluate the Maybe in a string-keyed record or object literal and collect the Just values in an equivalent structure.

    Type Parameters

    • TMaybes extends Record<string, Maybe<any>>

    Parameters

    • props: TMaybes

    Returns Maybe<{
        -readonly [K in keyof TMaybes]: JustT<TMaybes[K]>
    }>

    Remarks

    This function turns a string-keyed record or object literal of Maybe "inside out". For example:

    • Record<string, Maybe<T>> becomes Maybe<Record<string, T>>
    • { x: Maybe<T1>, y: Maybe<T2> } becomes Maybe<{ x: T1, y: T2 }>

Generated using TypeDoc