1 | import { Operation } from '..';
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 | export declare type Path = number[];
|
8 | export interface PathInterface {
|
9 | ancestors: (path: Path, options?: {
|
10 | reverse?: boolean;
|
11 | }) => Path[];
|
12 | common: (path: Path, another: Path) => Path;
|
13 | compare: (path: Path, another: Path) => -1 | 0 | 1;
|
14 | endsAfter: (path: Path, another: Path) => boolean;
|
15 | endsAt: (path: Path, another: Path) => boolean;
|
16 | endsBefore: (path: Path, another: Path) => boolean;
|
17 | equals: (path: Path, another: Path) => boolean;
|
18 | hasPrevious: (path: Path) => boolean;
|
19 | isAfter: (path: Path, another: Path) => boolean;
|
20 | isAncestor: (path: Path, another: Path) => boolean;
|
21 | isBefore: (path: Path, another: Path) => boolean;
|
22 | isChild: (path: Path, another: Path) => boolean;
|
23 | isCommon: (path: Path, another: Path) => boolean;
|
24 | isDescendant: (path: Path, another: Path) => boolean;
|
25 | isParent: (path: Path, another: Path) => boolean;
|
26 | isPath: (value: any) => value is Path;
|
27 | isSibling: (path: Path, another: Path) => boolean;
|
28 | levels: (path: Path, options?: {
|
29 | reverse?: boolean;
|
30 | }) => Path[];
|
31 | next: (path: Path) => Path;
|
32 | parent: (path: Path) => Path;
|
33 | previous: (path: Path) => Path;
|
34 | relative: (path: Path, ancestor: Path) => Path;
|
35 | transform: (path: Path, operation: Operation, options?: {
|
36 | affinity?: 'forward' | 'backward' | null;
|
37 | }) => Path | null;
|
38 | }
|
39 | export declare const Path: PathInterface;
|
40 |
|
\ | No newline at end of file |