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 {
127127 * ```
128128 */
129129 parent ?: ( string | StateDeclaration ) ;
130+
131+ /**
132+ * Gets the private API portion of the state
133+ *
134+ * @hidden
135+ */
136+ $$state ?: ( ) => State ;
130137
131138 /**
132139 * A property of [[StateDeclaration]]:
Original file line number Diff line number Diff line change @@ -53,6 +53,11 @@ export class StateBuilder {
5353 const root = ( ) => matcher . find ( "" ) ;
5454
5555 this . builders = {
56+ self : [ function ( state : State ) {
57+ state . self . $$state = ( ) => state ;
58+ return state . self ;
59+ } ] ,
60+
5661 parent : [ function ( state : State ) {
5762 if ( isRoot ( state ) ) return null ;
5863 return matcher . find ( self . parentName ( state ) ) || root ( ) ;
You can’t perform that action at this time.
0 commit comments