Logos DX
    Preparing search index...

    Type Alias PathNames<T>

    PathNames: T extends object
        ? {
            [K in keyof T]: `${Exclude<K, symbol>}${
                | ""
                | `.${T[K] extends Set<infer SetValue>
                    ? SetValue extends object
                        ? `${number}`
                        | `${number}.${PathNames<(...)>}`
                        : `${number}`
                    : T[K] extends Map<infer MapKey, infer MapValue>
                        ? MapValue extends object
                            ? MapKey extends (...) | (...) ? (...) | (...) : (...) | (...)
                            : MapKey extends (...) | (...) ? `${(...)}` : string
                        : T[K] extends any[]
                            ? (...)[(...)] extends (...)[]
                                ? (...) extends (...) ? (...) : (...)
                                : `${(...)}`
                            : PathNames<(...)[(...)]>}`}`
        }[keyof T]
        : never

    Generates all possible dot-notation paths for an object type.

    Essential for autocomplete in configuration systems, form builders, and any API that accepts property paths as strings.

    Type Parameters

    • T
    interface User { profile: { name: string; age: number; }; tags: string[]; }
    type UserPaths = PathNames<User>; // 'profile' | 'profile.name' | 'profile.age' | 'tags' | 'tags.0'