import { Or } from "../boolean"; import { List } from "../list"; import { Builtin } from "../primitive"; import { Extends, IsAny, IsNever, IsUnknown, Satisfies, Unreachable } from "../type"; import { Key, ValueOf } from "."; type _KeyPaths = []> = Or.Unbounded<[IsAny, IsUnknown, IsNever, Extends.Nondistributive]> extends true ? [path: Acc, value: T] : T extends Record ? ValueOf<{ [P in keyof T]: _KeyPaths]>; }> : [path: Acc, value: T]; /** * creates a union type of all string key paths to any given leaf in an object * * @since 0.0.9 */ export type KeyPaths = O extends Record ? _KeyPaths extends infer R ? R extends [[any, ...any], any] ? R : never : Unreachable : never; export {}; //# sourceMappingURL=key-paths.d.ts.map