Skip to content

Commit

Permalink
fix(pathNode): add backwards compat for PathNode.clone(). Add retaine…
Browse files Browse the repository at this point in the history
…dWithToParams to treeChanges interface.
  • Loading branch information
christopherthielen committed Jan 28, 2018
1 parent 632ed4f commit 4833a32
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/path/pathNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ export class PathNode {
/** The state's declared view configuration objects */
public views: ViewConfig[];

/**
* Returns a clone of the PathNode
* @deprecated use instance method `node.clone()`
*/
static clone = (node: PathNode) => node.clone();

/** Creates a copy of a PathNode */
constructor(node: PathNode);
/** Creates a new (empty) PathNode for a State */
Expand Down
10 changes: 10 additions & 0 deletions src/transition/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,16 @@ export interface TreeChanges {
*/
retained: PathNode[];

/**
* The path of active nodes that the transition is retaining with updated "to params" applied.
*
* These nodes are neither exited, nor entered.
* Before and after the transition is successful, these nodes are active.
*
* This is a shallow copy of [[retained]], but with new (dynamic) parameter values from [[to]] applied.
*/
retainedWithToParams: PathNode[];

/**
* The path of previously active nodes that the transition is exiting.
*
Expand Down

0 comments on commit 4833a32

Please sign in to comment.