Type alias RecursiveObjectModification<T, TCondition, TValue, TReplaceOrSpread>

RecursiveObjectModification<T, TCondition, TValue, TReplaceOrSpread>: T extends (infer U)[]
    ? RecursiveObjectModification<U, TCondition, TValue, TReplaceOrSpread>[]
    : T extends NativeObject
        ? T
        : T extends Record<string, any>
            ? T extends TCondition
                ? TReplaceOrSpread extends "spread"
                    ? Spread<T, TValue>
                    : TValue
                : {
                    [K in keyof T]: RecursiveObjectModification<T[K], TCondition, TValue, TReplaceOrSpread>
                }
            : T

RecursiveObjectModification<T, TCondition, TValue, TReplaceOrSpread> Internal utility type for recursively modifying an object type T.

Type Parameters

  • T

    The type to be modified.

  • TCondition extends Record<string, any>

    The condition used to identify objects in T for modification.

  • TValue extends Record<string, any>

    The type to apply in the modification.

  • TReplaceOrSpread extends "spread" | "replace"

    Specifies whether to replace or spread the type.

Returns

The modified type as per the specified operation.

Generated using TypeDoc