1 | import { StateObject } from '../state/stateObject';
|
2 | import { RawParams } from '../params/interface';
|
3 | import { Param } from '../params/param';
|
4 | import { Resolvable } from '../resolve/resolvable';
|
5 | import { ViewConfig } from '../view/interface';
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 | export declare class PathNode {
|
14 |
|
15 | state: StateObject;
|
16 |
|
17 | paramSchema: Param[];
|
18 |
|
19 | paramValues: {
|
20 | [key: string]: any;
|
21 | };
|
22 |
|
23 | resolvables: Resolvable[];
|
24 |
|
25 | views: ViewConfig[];
|
26 | |
27 |
|
28 |
|
29 |
|
30 | static clone: (node: PathNode) => PathNode;
|
31 |
|
32 | constructor(node: PathNode);
|
33 | /** Creates a new (empty) PathNode for a State */
|
34 | constructor(state: StateObject);
|
35 | clone(): PathNode;
|
36 | /** Sets [[paramValues]] for the node, from the values of an object hash */
|
37 | applyRawParams(params: RawParams): PathNode;
|
38 | /** Gets a specific [[Param]] metadata that belongs to the node */
|
39 | parameter(name: string): Param;
|
40 | /**
|
41 | * @returns true if the state and parameter values for another PathNode are
|
42 | * equal to the state and param values for this PathNode
|
43 | */
|
44 | equals(node: PathNode, paramsFn?: GetParamsFn): boolean;
|
45 | /**
|
46 | * Finds Params with different parameter values on another PathNode.
|
47 | *
|
48 | * Given another node (of the same state), finds the parameter values which differ.
|
49 | * Returns the [[Param]] (schema objects) whose parameter values differ.
|
50 | *
|
51 | * Given another node for a different state, returns `false`
|
52 | *
|
53 | * @param node The node to compare to
|
54 | * @param paramsFn A function that returns which parameters should be compared.
|
55 | * @returns The [[Param]]s which differ, or null if the two nodes are for different states
|
56 | */
|
57 | diff(node: PathNode, paramsFn?: GetParamsFn): Param[] | false;
|
58 | }
|
59 | /** @internal */
|
60 | export type GetParamsFn = (pathNode: PathNode) => Param[];
|