Skip to content

Commit 4833a32

Browse files
fix(pathNode): add backwards compat for PathNode.clone(). Add retainedWithToParams to treeChanges interface.
1 parent 632ed4f commit 4833a32

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

src/path/pathNode.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ export class PathNode {
2828
/** The state's declared view configuration objects */
2929
public views: ViewConfig[];
3030

31+
/**
32+
* Returns a clone of the PathNode
33+
* @deprecated use instance method `node.clone()`
34+
*/
35+
static clone = (node: PathNode) => node.clone();
36+
3137
/** Creates a copy of a PathNode */
3238
constructor(node: PathNode);
3339
/** Creates a new (empty) PathNode for a State */

src/transition/interface.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,16 @@ export interface TreeChanges {
137137
*/
138138
retained: PathNode[];
139139

140+
/**
141+
* The path of active nodes that the transition is retaining with updated "to params" applied.
142+
*
143+
* These nodes are neither exited, nor entered.
144+
* Before and after the transition is successful, these nodes are active.
145+
*
146+
* This is a shallow copy of [[retained]], but with new (dynamic) parameter values from [[to]] applied.
147+
*/
148+
retainedWithToParams: PathNode[];
149+
140150
/**
141151
* The path of previously active nodes that the transition is exiting.
142152
*

0 commit comments

Comments
 (0)