import { DecrementDepth, Depth } from "./Depth.js"; import { ShouldTerminatePathing } from "./ShouldTerminatePathing.js"; import { Obj } from "./Obj.js"; import { PrependPath } from "./PrependPath.js"; import { ToNumber } from "./ToNumber.js"; import { ArrayIndex } from "./ArrayIndex.js"; /** * Internal path builder that recurses through object properties. * Handles objects, arrays, and tuples. */ type BuildPaths = ShouldTerminatePathing extends true ? never : T extends readonly unknown[] ? { [K in ArrayIndex]: PrependPath | BuildPaths], DecrementDepth, PrependPath>; }[ArrayIndex] : T extends Obj ? { [K in keyof T]: PrependPath | BuildPaths, PrependPath>; }[keyof T] : never; /** * Generates a union of all valid dot-notation paths for type T. * * @typeParam T - The object type to generate paths for * @typeParam D - Depth tuple (default: Depth<5> = 5 levels) * * @example * type Obj = { user: { name: string } }; * type Paths = Path; // "user" | "user.name" */ export type Path> = BuildPaths & string; export {}; //# sourceMappingURL=Path.d.ts.map