Path.d.ts 354 B

1234567891011121314
  1. export type Path = {
  2. prev: Path | undefined;
  3. key: string | number;
  4. };
  5. /**
  6. * Given a Path and a key, return a new Path containing the new key.
  7. */
  8. export function addPath(prev: Path | undefined, key: string | number): Path;
  9. /**
  10. * Given a Path, return an Array of the path keys.
  11. */
  12. export function pathToArray(path: Path): Array<string | number>;