Logos DX
    Preparing search index...

    Type Alias PathLeaves<T>

    PathLeaves: T extends object
        ? {
            [K in keyof T]-?: T[K] extends undefined
                ? never
                : `${Exclude<K, symbol>}${PathLeaves<T[K]> extends never
                    ? ""
                    : `.${PathLeaves<T[K]>}`}`
        }[keyof T]
        : never

    Generates only the leaf paths (final values) for an object type.

    Useful for validation systems and data mapping where you only care about paths that lead to actual values, not intermediate objects.

    Type Parameters

    • T
    interface User { profile: { name: string; age: number; }; }
    type UserLeaves = PathLeaves<User>; // 'profile.name' | 'profile.age'