We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
$$state()
1 parent 88c624d commit 92053f1Copy full SHA for 92053f1
src/state/interface.ts
@@ -127,6 +127,13 @@ export interface StateDeclaration {
127
* ```
128
*/
129
parent?: (string|StateDeclaration);
130
+
131
+ /**
132
+ * Gets the private API portion of the state
133
+ *
134
+ * @hidden
135
+ */
136
+ $$state?: () => State;
137
138
/**
139
* A property of [[StateDeclaration]]:
src/state/stateBuilder.ts
@@ -53,6 +53,11 @@ export class StateBuilder {
53
const root = () => matcher.find("");
54
55
this.builders = {
56
+ self: [function (state: State) {
57
+ state.self.$$state = () => state;
58
+ return state.self;
59
+ }],
60
61
parent: [function (state: State) {
62
if (isRoot(state)) return null;
63
return matcher.find(self.parentName(state)) || root();
0 commit comments