import { StringToPath } from "../node_modules/.pnpm/remeda@2.39.0_patch_hash_e9e98c19bf4c5844450bf78de4493bf242de2fdb7c7ecf7ee2313945578d9b68/node_modules/remeda/dist/index.mjs"; //#region src/object/to-path-segments.d.ts /** * Parses a deep-path string like `'a.b[0].c'` into its array of segments. A * string literal is parsed into a **precisely-typed tuple** (`['a', 'b', 0, 'c']`), * with numeric bracket/dot segments narrowed to `number`; an array of segments * is returned as a shallow copy unchanged. * * Note: numeric segments come back as `number`s — e.g. `[0]` → `0`, not `'0'`. * @param path - A path string (`'a.b[0].c'`) or an array of segments. * @returns The array of path segments — a typed tuple for a literal string input. * @example * // String input — parsed into a typed tuple (numeric segments are numbers) * toPathSegments('a.b[0].c'); * // ['a', 'b', 0, 'c'] * @example * // Array input — returned as a shallow copy, unchanged * toPathSegments(['a', 0, 'b']); * // ['a', 0, 'b'] */ declare function toPathSegments(path: Path): StringToPath; declare function toPathSegments(path: T): T; //#endregion export { toPathSegments };