Type Alias DotPathKeys<T, Depth>

DotPathKeys: Depth["length"] extends MaxDotPathDepth
    ? never
    : T extends NonRecursiveLeaf
        ? never
        : T extends object
            ? {
                [K in keyof T & string]: | K
                | (
                    DotPathKeys<T[K], [...(...), unknown]> extends infer D extends
                        string
                        ? `${K}.${D}`
                        : never
                )
            }[keyof T & string]
            : never

Recursively generates dot-separated key paths for plain object types. Stops recursion at NonRecursiveLeaf types and at MaxDotPathDepth levels to prevent "Type instantiation is excessively deep" errors.

Type Parameters

  • T

    The object type to generate paths for.

  • Depth extends unknown[] = []

    Internal depth counter (tuple). Do not provide externally.