File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -127,6 +127,13 @@ export interface StateDeclaration {
127
127
* ```
128
128
*/
129
129
parent ?: ( string | StateDeclaration ) ;
130
+
131
+ /**
132
+ * Gets the private API portion of the state
133
+ *
134
+ * @hidden
135
+ */
136
+ $$state ?: ( ) => State ;
130
137
131
138
/**
132
139
* A property of [[StateDeclaration]]:
Original file line number Diff line number Diff line change @@ -53,6 +53,11 @@ export class StateBuilder {
53
53
const root = ( ) => matcher . find ( "" ) ;
54
54
55
55
this . builders = {
56
+ self : [ function ( state : State ) {
57
+ state . self . $$state = ( ) => state ;
58
+ return state . self ;
59
+ } ] ,
60
+
56
61
parent : [ function ( state : State ) {
57
62
if ( isRoot ( state ) ) return null ;
58
63
return matcher . find ( self . parentName ( state ) ) || root ( ) ;
You can’t perform that action at this time.
0 commit comments