@metreeca/blue - v0.10.0
    Preparing search index...

    Type Alias Relaxed<P>

    Relaxed: Merged<
        { [K in keyof P as undefined extends P[K] ? never : K]: P[K] } & {
            [K in keyof P as undefined extends P[K] ? K : never]?: P[K]
        },
    >

    Relaxes the keys of an object type into optional keys wherever the value type admits absence.

    Marks every key whose type includes undefined as an optional key and leaves the rest required, so a value literal spells out only the entries it actually carries instead of padding absent ones with undefined. Reading is unaffected: an omitted key still yields undefined.

    Used by Prototype to relax template entries whose cardinality admits absence. The modifiers are carried into State by Slots, which preserves them as it projects the template, so nested and inherited entries relax alongside local ones.

    Type Parameters

    • P

      The object type to relax

    Apply to an already projected template rather than folding the undefined test into the projection itself: repeating the projection inside the key filter multiplies its instantiation depth and exhausts the compiler's recursion budget on deeply nested shapes.