xstate 4.27.0-pr2674-2021926101023 → 4.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -12
- package/dist/xstate.interpreter.js +1 -1
- package/dist/xstate.js +1 -1
- package/dist/xstate.web.js +2 -2
- package/es/Actor.d.ts +2 -1
- package/es/Machine.d.ts +4 -5
- package/es/State.d.ts +14 -13
- package/es/State.js +10 -3
- package/es/StateNode.d.ts +16 -20
- package/es/StateNode.js +51 -57
- package/es/_virtual/_tslib.js +8 -4
- package/es/actions.d.ts +20 -3
- package/es/actions.js +7 -7
- package/es/behaviors.d.ts +1 -1
- package/es/devTools.d.ts +2 -3
- package/es/devTools.js +4 -0
- package/es/each.d.ts +1 -1
- package/es/index.d.ts +0 -1
- package/es/interpreter.d.ts +25 -35
- package/es/interpreter.js +21 -16
- package/es/model.d.ts +2 -2
- package/es/model.types.d.ts +9 -8
- package/es/registry.js +1 -1
- package/es/scxml.d.ts +2 -2
- package/es/stateUtils.d.ts +5 -6
- package/es/stateUtils.js +1 -1
- package/es/types.d.ts +52 -104
- package/es/utils.d.ts +1 -1
- package/es/utils.js +10 -10
- package/lib/Actor.d.ts +2 -1
- package/lib/Machine.d.ts +4 -5
- package/lib/SimulatedClock.js +9 -5
- package/lib/State.d.ts +14 -13
- package/lib/State.js +10 -3
- package/lib/StateNode.d.ts +16 -20
- package/lib/StateNode.js +49 -55
- package/lib/_virtual/_tslib.js +8 -4
- package/lib/actions.d.ts +20 -3
- package/lib/actions.js +7 -7
- package/lib/behaviors.d.ts +1 -1
- package/lib/devTools.d.ts +2 -3
- package/lib/devTools.js +4 -0
- package/lib/each.d.ts +1 -1
- package/lib/index.d.ts +0 -1
- package/lib/interpreter.d.ts +25 -35
- package/lib/interpreter.js +21 -16
- package/lib/json.js +7 -7
- package/lib/model.d.ts +2 -2
- package/lib/model.js +14 -10
- package/lib/model.types.d.ts +9 -8
- package/lib/patterns.js +2 -2
- package/lib/registry.js +1 -1
- package/lib/scxml.d.ts +2 -2
- package/lib/scxml.js +29 -25
- package/lib/stateUtils.d.ts +5 -6
- package/lib/stateUtils.js +1 -1
- package/lib/types.d.ts +52 -104
- package/lib/utils.d.ts +1 -1
- package/lib/utils.js +10 -10
- package/package.json +4 -8
- package/dist/xstate.cjs.d.ts +0 -11
- package/dist/xstate.cjs.js +0 -16
- package/es/typegenTypes.d.ts +0 -92
- package/lib/typegenTypes.d.ts +0 -92
- package/lib/typegenTypes.js +0 -2
package/lib/StateNode.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { Event, StateValue, MachineOptions, EventObject, HistoryValue, StateNodeDefinition, TransitionDefinition, DelayedTransitionDefinition, ActivityDefinition, StateNodeConfig, StateSchema, StateNodesConfig, InvokeDefinition, ActionObject, Mapper, PropertyMapper, SCXML, Typestate, TransitionDefinitionMap, MachineSchema
|
|
1
|
+
import { Event, StateValue, StateTransition, MachineOptions, EventObject, HistoryValue, StateNodeDefinition, TransitionDefinition, DelayedTransitionDefinition, ActivityDefinition, StateNodeConfig, StateSchema, StateNodesConfig, InvokeDefinition, ActionObject, Mapper, PropertyMapper, SCXML, Typestate, TransitionDefinitionMap, MachineSchema } from './types';
|
|
2
2
|
import { State } from './State';
|
|
3
|
-
import { TypegenDisabled } from './typegenTypes';
|
|
4
3
|
declare class StateNode<TContext = any, TStateSchema extends StateSchema = any, TEvent extends EventObject = EventObject, TTypestate extends Typestate<TContext> = {
|
|
5
4
|
value: any;
|
|
6
5
|
context: TContext;
|
|
7
|
-
}
|
|
6
|
+
}> {
|
|
8
7
|
/**
|
|
9
8
|
* The raw config used to create the machine.
|
|
10
9
|
*/
|
|
@@ -120,15 +119,11 @@ declare class StateNode<TContext = any, TStateSchema extends StateSchema = any,
|
|
|
120
119
|
/**
|
|
121
120
|
* The raw config used to create the machine.
|
|
122
121
|
*/
|
|
123
|
-
config: StateNodeConfig<TContext, TStateSchema, TEvent>, options?: MachineOptions<TContext, TEvent
|
|
122
|
+
config: StateNodeConfig<TContext, TStateSchema, TEvent>, options?: Partial<MachineOptions<TContext, TEvent>>,
|
|
124
123
|
/**
|
|
125
124
|
* The initial extended state
|
|
126
125
|
*/
|
|
127
|
-
_context?: Readonly<TContext> | (() => Readonly<TContext>)
|
|
128
|
-
_stateInfo?: {
|
|
129
|
-
parent: StateNode<any, any, any, any, any>;
|
|
130
|
-
key: string;
|
|
131
|
-
});
|
|
126
|
+
_context?: Readonly<TContext> | (() => Readonly<TContext>));
|
|
132
127
|
private _init;
|
|
133
128
|
/**
|
|
134
129
|
* Clones this state machine with custom options and context.
|
|
@@ -136,7 +131,7 @@ declare class StateNode<TContext = any, TStateSchema extends StateSchema = any,
|
|
|
136
131
|
* @param options Options (actions, guards, activities, services) to recursively merge with the existing options.
|
|
137
132
|
* @param context Custom context (will override predefined context)
|
|
138
133
|
*/
|
|
139
|
-
withConfig(options:
|
|
134
|
+
withConfig(options: Partial<MachineOptions<TContext, TEvent>>, context?: TContext | (() => TContext)): StateNode<TContext, TStateSchema, TEvent, TTypestate>;
|
|
140
135
|
/**
|
|
141
136
|
* Clones this state machine with custom context.
|
|
142
137
|
*
|
|
@@ -168,7 +163,7 @@ declare class StateNode<TContext = any, TStateSchema extends StateSchema = any,
|
|
|
168
163
|
*
|
|
169
164
|
* @param state The state value or State instance
|
|
170
165
|
*/
|
|
171
|
-
getStateNodes(state: StateValue | State<TContext, TEvent, any, TTypestate
|
|
166
|
+
getStateNodes(state: StateValue | State<TContext, TEvent, any, TTypestate>): Array<StateNode<TContext, any, TEvent, TTypestate>>;
|
|
172
167
|
/**
|
|
173
168
|
* Returns `true` if this state node explicitly handles the given event.
|
|
174
169
|
*
|
|
@@ -182,11 +177,12 @@ declare class StateNode<TContext = any, TStateSchema extends StateSchema = any,
|
|
|
182
177
|
*
|
|
183
178
|
* @param state The state to resolve
|
|
184
179
|
*/
|
|
185
|
-
resolveState(state: State<TContext, TEvent, any, any
|
|
180
|
+
resolveState(state: State<TContext, TEvent, any, any>): State<TContext, TEvent, TStateSchema, TTypestate>;
|
|
186
181
|
private transitionLeafNode;
|
|
187
182
|
private transitionCompoundNode;
|
|
188
183
|
private transitionParallelNode;
|
|
189
184
|
private _transition;
|
|
185
|
+
getTransitionData(state: State<TContext, TEvent, any, any>, event: Event<TEvent> | SCXML.Event<TEvent>): StateTransition<TContext, TEvent> | undefined;
|
|
190
186
|
private next;
|
|
191
187
|
private nodesFromChild;
|
|
192
188
|
/**
|
|
@@ -202,25 +198,25 @@ declare class StateNode<TContext = any, TStateSchema extends StateSchema = any,
|
|
|
202
198
|
* @param event The event that was sent at the current state
|
|
203
199
|
* @param context The current context (extended state) of the current state
|
|
204
200
|
*/
|
|
205
|
-
transition(state: StateValue | State<TContext, TEvent, any, TTypestate
|
|
201
|
+
transition(state: StateValue | State<TContext, TEvent, any, TTypestate> | undefined, event: Event<TEvent> | SCXML.Event<TEvent>, context?: TContext): State<TContext, TEvent, TStateSchema, TTypestate>;
|
|
206
202
|
private resolveRaisedTransition;
|
|
207
203
|
private resolveTransition;
|
|
208
204
|
/**
|
|
209
205
|
* Returns the child state node from its relative `stateKey`, or throws.
|
|
210
206
|
*/
|
|
211
|
-
getStateNode(stateKey: string): StateNode<TContext, any, TEvent, TTypestate
|
|
207
|
+
getStateNode(stateKey: string): StateNode<TContext, any, TEvent, TTypestate>;
|
|
212
208
|
/**
|
|
213
209
|
* Returns the state node with the given `stateId`, or throws.
|
|
214
210
|
*
|
|
215
211
|
* @param stateId The state ID. The prefix "#" is removed.
|
|
216
212
|
*/
|
|
217
|
-
getStateNodeById(stateId: string): StateNode<TContext, any, TEvent, any
|
|
213
|
+
getStateNodeById(stateId: string): StateNode<TContext, any, TEvent, any>;
|
|
218
214
|
/**
|
|
219
215
|
* Returns the relative state node from the given `statePath`, or throws.
|
|
220
216
|
*
|
|
221
217
|
* @param statePath The string or string array relative path to the state node.
|
|
222
218
|
*/
|
|
223
|
-
getStateNodeByPath(statePath: string | string[]): StateNode<TContext, any, TEvent, any
|
|
219
|
+
getStateNodeByPath(statePath: string | string[]): StateNode<TContext, any, TEvent, any>;
|
|
224
220
|
/**
|
|
225
221
|
* Resolves a partial state value with its full representation in this machine.
|
|
226
222
|
*
|
|
@@ -229,12 +225,12 @@ declare class StateNode<TContext = any, TStateSchema extends StateSchema = any,
|
|
|
229
225
|
resolve(stateValue: StateValue): StateValue;
|
|
230
226
|
private getResolvedPath;
|
|
231
227
|
private get initialStateValue();
|
|
232
|
-
getInitialState(stateValue: StateValue, context?: TContext): State<TContext, TEvent, TStateSchema, TTypestate
|
|
228
|
+
getInitialState(stateValue: StateValue, context?: TContext): State<TContext, TEvent, TStateSchema, TTypestate>;
|
|
233
229
|
/**
|
|
234
230
|
* The initial State instance, which includes all actions to be executed from
|
|
235
231
|
* entering the initial state.
|
|
236
232
|
*/
|
|
237
|
-
get initialState(): State<TContext, TEvent, TStateSchema, TTypestate
|
|
233
|
+
get initialState(): State<TContext, TEvent, TStateSchema, TTypestate>;
|
|
238
234
|
/**
|
|
239
235
|
* The target state value of the history state node, if it exists. This represents the
|
|
240
236
|
* default state value to transition to if no history value exists yet.
|
|
@@ -248,14 +244,14 @@ declare class StateNode<TContext = any, TStateSchema extends StateSchema = any,
|
|
|
248
244
|
* @param resolve Whether state nodes should resolve to initial child state nodes
|
|
249
245
|
*/
|
|
250
246
|
getRelativeStateNodes(relativeStateId: StateNode<TContext, any, TEvent>, historyValue?: HistoryValue, resolve?: boolean): Array<StateNode<TContext, any, TEvent>>;
|
|
251
|
-
get initialStateNodes(): Array<StateNode<TContext, any, TEvent, any
|
|
247
|
+
get initialStateNodes(): Array<StateNode<TContext, any, TEvent, any>>;
|
|
252
248
|
/**
|
|
253
249
|
* Retrieves state nodes from a relative path to this state node.
|
|
254
250
|
*
|
|
255
251
|
* @param relativePath The relative path from this state node
|
|
256
252
|
* @param historyValue
|
|
257
253
|
*/
|
|
258
|
-
getFromRelativePath(relativePath: string[]): Array<StateNode<TContext, any, TEvent, any
|
|
254
|
+
getFromRelativePath(relativePath: string[]): Array<StateNode<TContext, any, TEvent, any>>;
|
|
259
255
|
private historyValue;
|
|
260
256
|
/**
|
|
261
257
|
* Resolves to the historical value(s) of the parent state node,
|
package/lib/StateNode.js
CHANGED
|
@@ -37,8 +37,8 @@ var validateArrayifiedTransitions = function (stateNode, event, transitions) {
|
|
|
37
37
|
var hasNonLastUnguardedTarget = transitions.slice(0, -1).some(function (transition) {
|
|
38
38
|
return !('cond' in transition) && !('in' in transition) && (utils.isString(transition.target) || utils.isMachine(transition.target));
|
|
39
39
|
});
|
|
40
|
-
var eventText = event === NULL_EVENT ? 'the transient event' : "event '"
|
|
41
|
-
utils.warn(!hasNonLastUnguardedTarget, "One or more transitions for "
|
|
40
|
+
var eventText = event === NULL_EVENT ? 'the transient event' : "event '".concat(event, "'");
|
|
41
|
+
utils.warn(!hasNonLastUnguardedTarget, "One or more transitions for ".concat(eventText, " on state '").concat(stateNode.id, "' are unreachable. ") + "Make sure that the default transition is the last one defined.");
|
|
42
42
|
};
|
|
43
43
|
|
|
44
44
|
var StateNode =
|
|
@@ -54,8 +54,8 @@ function () {
|
|
|
54
54
|
/**
|
|
55
55
|
* The initial extended state
|
|
56
56
|
*/
|
|
57
|
-
_context
|
|
58
|
-
|
|
57
|
+
_context // TODO: this is unsafe, but we're removing it in v5 anyway
|
|
58
|
+
) {
|
|
59
59
|
var _this = this;
|
|
60
60
|
|
|
61
61
|
if (_context === void 0) {
|
|
@@ -85,28 +85,28 @@ function () {
|
|
|
85
85
|
this.idMap = {};
|
|
86
86
|
this.tags = [];
|
|
87
87
|
this.options = Object.assign(createDefaultOptions(), options);
|
|
88
|
-
this.parent =
|
|
89
|
-
this.key = this.config.key ||
|
|
88
|
+
this.parent = this.options._parent;
|
|
89
|
+
this.key = this.config.key || this.options._key || this.config.id || '(machine)';
|
|
90
90
|
this.machine = this.parent ? this.parent.machine : this;
|
|
91
91
|
this.path = this.parent ? this.parent.path.concat(this.key) : [];
|
|
92
92
|
this.delimiter = this.config.delimiter || (this.parent ? this.parent.delimiter : constants.STATE_DELIMITER);
|
|
93
|
-
this.id = this.config.id || _tslib.__spreadArray([this.machine.key], _tslib.__read(this.path)).join(this.delimiter);
|
|
93
|
+
this.id = this.config.id || _tslib.__spreadArray([this.machine.key], _tslib.__read(this.path), false).join(this.delimiter);
|
|
94
94
|
this.version = this.parent ? this.parent.version : this.config.version;
|
|
95
95
|
this.type = this.config.type || (this.config.parallel ? 'parallel' : this.config.states && utils.keys(this.config.states).length ? 'compound' : this.config.history ? 'history' : 'atomic');
|
|
96
96
|
this.schema = this.parent ? this.machine.schema : (_a = this.config.schema) !== null && _a !== void 0 ? _a : {};
|
|
97
97
|
this.description = this.config.description;
|
|
98
98
|
|
|
99
99
|
if (!environment.IS_PRODUCTION) {
|
|
100
|
-
utils.warn(!('parallel' in this.config), "The \"parallel\" property is deprecated and will be removed in version 4.1. "
|
|
100
|
+
utils.warn(!('parallel' in this.config), "The \"parallel\" property is deprecated and will be removed in version 4.1. ".concat(this.config.parallel ? "Replace with `type: 'parallel'`" : "Use `type: '".concat(this.type, "'`"), " in the config for state node '").concat(this.id, "' instead."));
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
this.initial = this.config.initial;
|
|
104
104
|
this.states = this.config.states ? utils.mapValues(this.config.states, function (stateConfig, key) {
|
|
105
105
|
var _a;
|
|
106
106
|
|
|
107
|
-
var stateNode = new StateNode(stateConfig, {
|
|
108
|
-
|
|
109
|
-
|
|
107
|
+
var stateNode = new StateNode(stateConfig, {
|
|
108
|
+
_parent: _this,
|
|
109
|
+
_key: key
|
|
110
110
|
});
|
|
111
111
|
Object.assign(_this.idMap, _tslib.__assign((_a = {}, _a[stateNode.id] = stateNode, _a), stateNode.idMap));
|
|
112
112
|
return stateNode;
|
|
@@ -170,7 +170,7 @@ function () {
|
|
|
170
170
|
src: invokeConfig.src
|
|
171
171
|
}));
|
|
172
172
|
} else if (utils.isMachine(invokeConfig.src) || utils.isFunction(invokeConfig.src)) {
|
|
173
|
-
var invokeSrc = _this.id
|
|
173
|
+
var invokeSrc = "".concat(_this.id, ":invocation[").concat(i, "]"); // TODO: util function
|
|
174
174
|
|
|
175
175
|
_this.machine.options.services = _tslib.__assign((_b = {}, _b[invokeSrc] = invokeConfig.src, _b), _this.machine.options.services);
|
|
176
176
|
return invokeUtils.toInvokeDefinition(_tslib.__assign(_tslib.__assign({
|
|
@@ -351,7 +351,7 @@ function () {
|
|
|
351
351
|
}
|
|
352
352
|
|
|
353
353
|
var mutateEntryExit = function (delay, i) {
|
|
354
|
-
var delayRef = utils.isFunction(delay) ? _this.id
|
|
354
|
+
var delayRef = utils.isFunction(delay) ? "".concat(_this.id, ":delay[").concat(i, "]") : delay;
|
|
355
355
|
var eventType = actions.after(delayRef, _this.id);
|
|
356
356
|
|
|
357
357
|
_this.onEntry.push(actions.send(eventType, {
|
|
@@ -413,15 +413,11 @@ function () {
|
|
|
413
413
|
}
|
|
414
414
|
|
|
415
415
|
var subStateKeys = utils.keys(stateValue);
|
|
416
|
-
var subStateNodes =
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
return subStateNodes
|
|
421
|
-
var subStateNode = _this.getStateNode(subStateKey).getStateNodes(stateValue[subStateKey]);
|
|
422
|
-
|
|
423
|
-
return allSubStateNodes.concat(subStateNode);
|
|
424
|
-
}, []));
|
|
416
|
+
var subStateNodes = [this];
|
|
417
|
+
subStateNodes.push.apply(subStateNodes, _tslib.__spreadArray([], _tslib.__read(utils.flatten(subStateKeys.map(function (subStateKey) {
|
|
418
|
+
return _this.getStateNode(subStateKey).getStateNodes(stateValue[subStateKey]);
|
|
419
|
+
}))), false));
|
|
420
|
+
return subStateNodes;
|
|
425
421
|
};
|
|
426
422
|
/**
|
|
427
423
|
* Returns `true` if this state node explicitly handles the given event.
|
|
@@ -560,6 +556,10 @@ function () {
|
|
|
560
556
|
return this.transitionParallelNode(stateValue, state, _event);
|
|
561
557
|
};
|
|
562
558
|
|
|
559
|
+
StateNode.prototype.getTransitionData = function (state, event) {
|
|
560
|
+
return this._transition(state.value, state, utils.toSCXMLEvent(event));
|
|
561
|
+
};
|
|
562
|
+
|
|
563
563
|
StateNode.prototype.next = function (state, _event) {
|
|
564
564
|
var e_3, _a;
|
|
565
565
|
|
|
@@ -584,7 +584,7 @@ function () {
|
|
|
584
584
|
try {
|
|
585
585
|
guardPassed = !cond || utils.evaluateGuard(this.machine, cond, resolvedContext, _event, state);
|
|
586
586
|
} catch (err) {
|
|
587
|
-
throw new Error("Unable to evaluate guard '"
|
|
587
|
+
throw new Error("Unable to evaluate guard '".concat(cond.name || cond.type, "' in transition for event '").concat(eventName, "' in state node '").concat(this.id, "':\n").concat(err.message));
|
|
588
588
|
}
|
|
589
589
|
|
|
590
590
|
if (guardPassed && isInState) {
|
|
@@ -592,7 +592,7 @@ function () {
|
|
|
592
592
|
nextStateNodes = candidate.target;
|
|
593
593
|
}
|
|
594
594
|
|
|
595
|
-
actions.push.apply(actions, _tslib.__spreadArray([], _tslib.__read(candidate.actions)));
|
|
595
|
+
actions.push.apply(actions, _tslib.__spreadArray([], _tslib.__read(candidate.actions), false));
|
|
596
596
|
selectedTransition = candidate;
|
|
597
597
|
break;
|
|
598
598
|
}
|
|
@@ -728,12 +728,6 @@ function () {
|
|
|
728
728
|
}
|
|
729
729
|
}
|
|
730
730
|
|
|
731
|
-
if (!transition.source) {
|
|
732
|
-
transition.exitSet = []; // Ensure that root StateNode (machine) is entered
|
|
733
|
-
|
|
734
|
-
transition.entrySet.push(this);
|
|
735
|
-
}
|
|
736
|
-
|
|
737
731
|
var doneEvents = utils.flatten(transition.entrySet.map(function (sn) {
|
|
738
732
|
var events = [];
|
|
739
733
|
|
|
@@ -773,11 +767,11 @@ function () {
|
|
|
773
767
|
var _c = _tslib.__read([utils.flatten(Array.from(entryStates).map(function (stateNode) {
|
|
774
768
|
return _tslib.__spreadArray(_tslib.__spreadArray([], _tslib.__read(stateNode.activities.map(function (activity) {
|
|
775
769
|
return actions.start(activity);
|
|
776
|
-
}))), _tslib.__read(stateNode.onEntry));
|
|
770
|
+
})), false), _tslib.__read(stateNode.onEntry), false);
|
|
777
771
|
})).concat(doneEvents.map(actions.raise)), utils.flatten(Array.from(exitStates).map(function (stateNode) {
|
|
778
|
-
return _tslib.__spreadArray(_tslib.__spreadArray([], _tslib.__read(stateNode.onExit)), _tslib.__read(stateNode.activities.map(function (activity) {
|
|
772
|
+
return _tslib.__spreadArray(_tslib.__spreadArray([], _tslib.__read(stateNode.onExit), false), _tslib.__read(stateNode.activities.map(function (activity) {
|
|
779
773
|
return actions.stop(activity);
|
|
780
|
-
})));
|
|
774
|
+
})), false);
|
|
781
775
|
}))], 2),
|
|
782
776
|
entryActions = _c[0],
|
|
783
777
|
exitActions = _c[1];
|
|
@@ -812,12 +806,12 @@ function () {
|
|
|
812
806
|
}
|
|
813
807
|
|
|
814
808
|
if (!environment.IS_PRODUCTION && _event.name === WILDCARD) {
|
|
815
|
-
throw new Error("An event cannot have the wildcard type ('"
|
|
809
|
+
throw new Error("An event cannot have the wildcard type ('".concat(WILDCARD, "')"));
|
|
816
810
|
}
|
|
817
811
|
|
|
818
812
|
if (this.strict) {
|
|
819
813
|
if (!this.events.includes(_event.name) && !utils.isBuiltInEvent(_event.name)) {
|
|
820
|
-
throw new Error("Machine '"
|
|
814
|
+
throw new Error("Machine '".concat(this.id, "' does not accept event '").concat(_event.name, "'"));
|
|
821
815
|
}
|
|
822
816
|
}
|
|
823
817
|
|
|
@@ -831,7 +825,7 @@ function () {
|
|
|
831
825
|
};
|
|
832
826
|
var prevConfig = stateUtils.getConfiguration([], this.getStateNodes(currentState.value));
|
|
833
827
|
var resolvedConfig = stateTransition.configuration.length ? stateUtils.getConfiguration(prevConfig, stateTransition.configuration) : prevConfig;
|
|
834
|
-
stateTransition.configuration = _tslib.__spreadArray([], _tslib.__read(resolvedConfig));
|
|
828
|
+
stateTransition.configuration = _tslib.__spreadArray([], _tslib.__read(resolvedConfig), false);
|
|
835
829
|
return this.resolveTransition(stateTransition, currentState, _event);
|
|
836
830
|
};
|
|
837
831
|
|
|
@@ -845,7 +839,7 @@ function () {
|
|
|
845
839
|
state._event = originalEvent;
|
|
846
840
|
state.event = originalEvent.data;
|
|
847
841
|
|
|
848
|
-
(_a = state.actions).unshift.apply(_a, _tslib.__spreadArray([], _tslib.__read(currentActions)));
|
|
842
|
+
(_a = state.actions).unshift.apply(_a, _tslib.__spreadArray([], _tslib.__read(currentActions), false));
|
|
849
843
|
|
|
850
844
|
return state;
|
|
851
845
|
};
|
|
@@ -996,13 +990,13 @@ function () {
|
|
|
996
990
|
}
|
|
997
991
|
|
|
998
992
|
if (!this.states) {
|
|
999
|
-
throw new Error("Unable to retrieve child state '"
|
|
993
|
+
throw new Error("Unable to retrieve child state '".concat(stateKey, "' from '").concat(this.id, "'; no child states exist."));
|
|
1000
994
|
}
|
|
1001
995
|
|
|
1002
996
|
var result = this.states[stateKey];
|
|
1003
997
|
|
|
1004
998
|
if (!result) {
|
|
1005
|
-
throw new Error("Child state '"
|
|
999
|
+
throw new Error("Child state '".concat(stateKey, "' does not exist on '").concat(this.id, "'"));
|
|
1006
1000
|
}
|
|
1007
1001
|
|
|
1008
1002
|
return result;
|
|
@@ -1024,7 +1018,7 @@ function () {
|
|
|
1024
1018
|
var stateNode = this.machine.idMap[resolvedStateId];
|
|
1025
1019
|
|
|
1026
1020
|
if (!stateNode) {
|
|
1027
|
-
throw new Error("Child state node '#"
|
|
1021
|
+
throw new Error("Child state node '#".concat(resolvedStateId, "' does not exist on machine '").concat(this.id, "'"));
|
|
1028
1022
|
}
|
|
1029
1023
|
|
|
1030
1024
|
return stateNode;
|
|
@@ -1111,7 +1105,7 @@ function () {
|
|
|
1111
1105
|
var stateNode = this.machine.idMap[stateIdentifier.slice(STATE_IDENTIFIER.length)];
|
|
1112
1106
|
|
|
1113
1107
|
if (!stateNode) {
|
|
1114
|
-
throw new Error("Unable to find state node '"
|
|
1108
|
+
throw new Error("Unable to find state node '".concat(stateIdentifier, "'"));
|
|
1115
1109
|
}
|
|
1116
1110
|
|
|
1117
1111
|
return stateNode.path;
|
|
@@ -1138,7 +1132,7 @@ function () {
|
|
|
1138
1132
|
});
|
|
1139
1133
|
} else if (this.initial !== undefined) {
|
|
1140
1134
|
if (!this.states[this.initial]) {
|
|
1141
|
-
throw new Error("Initial state '"
|
|
1135
|
+
throw new Error("Initial state '".concat(this.initial, "' not found on '").concat(this.key, "'"));
|
|
1142
1136
|
}
|
|
1143
1137
|
|
|
1144
1138
|
initialStateValue = stateUtils.isLeafNode(this.states[this.initial]) ? this.initial : (_a = {}, _a[this.initial] = this.states[this.initial].initialStateValue, _a);
|
|
@@ -1178,7 +1172,7 @@ function () {
|
|
|
1178
1172
|
var initialStateValue = this.initialStateValue;
|
|
1179
1173
|
|
|
1180
1174
|
if (!initialStateValue) {
|
|
1181
|
-
throw new Error("Cannot retrieve initial state from simple state '"
|
|
1175
|
+
throw new Error("Cannot retrieve initial state from simple state '".concat(this.id, "'."));
|
|
1182
1176
|
}
|
|
1183
1177
|
|
|
1184
1178
|
return this.getInitialState(initialStateValue);
|
|
@@ -1236,7 +1230,7 @@ function () {
|
|
|
1236
1230
|
|
|
1237
1231
|
if (this.type === 'compound' && !this.initial) {
|
|
1238
1232
|
if (!environment.IS_PRODUCTION) {
|
|
1239
|
-
utils.warn(false, "Compound state node '"
|
|
1233
|
+
utils.warn(false, "Compound state node '".concat(this.id, "' has no initial state."));
|
|
1240
1234
|
}
|
|
1241
1235
|
|
|
1242
1236
|
return [this];
|
|
@@ -1267,7 +1261,7 @@ function () {
|
|
|
1267
1261
|
childStatePath = _a.slice(1);
|
|
1268
1262
|
|
|
1269
1263
|
if (!this.states) {
|
|
1270
|
-
throw new Error("Cannot retrieve subPath '"
|
|
1264
|
+
throw new Error("Cannot retrieve subPath '".concat(stateKey, "' from node with no states"));
|
|
1271
1265
|
}
|
|
1272
1266
|
|
|
1273
1267
|
var childStateNode = this.getStateNode(stateKey);
|
|
@@ -1277,7 +1271,7 @@ function () {
|
|
|
1277
1271
|
}
|
|
1278
1272
|
|
|
1279
1273
|
if (!this.states[stateKey]) {
|
|
1280
|
-
throw new Error("Child state '"
|
|
1274
|
+
throw new Error("Child state '".concat(stateKey, "' does not exist on '").concat(this.id, "'"));
|
|
1281
1275
|
}
|
|
1282
1276
|
|
|
1283
1277
|
return this.states[stateKey].getFromRelativePath(childStatePath);
|
|
@@ -1376,7 +1370,7 @@ function () {
|
|
|
1376
1370
|
try {
|
|
1377
1371
|
for (var _e = (e_8 = void 0, _tslib.__values(state.events)), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
1378
1372
|
var event_1 = _f.value;
|
|
1379
|
-
events.add(""
|
|
1373
|
+
events.add("".concat(event_1));
|
|
1380
1374
|
}
|
|
1381
1375
|
} catch (e_8_1) {
|
|
1382
1376
|
e_8 = {
|
|
@@ -1455,7 +1449,7 @@ function () {
|
|
|
1455
1449
|
|
|
1456
1450
|
return targetStateNode;
|
|
1457
1451
|
} catch (err) {
|
|
1458
|
-
throw new Error("Invalid transition definition for state node '"
|
|
1452
|
+
throw new Error("Invalid transition definition for state node '".concat(_this.id, "':\n").concat(err.message));
|
|
1459
1453
|
}
|
|
1460
1454
|
} else {
|
|
1461
1455
|
return _this.getStateNodeByPath(resolvedTarget);
|
|
@@ -1483,9 +1477,9 @@ function () {
|
|
|
1483
1477
|
toJSON: function () {
|
|
1484
1478
|
return _tslib.__assign(_tslib.__assign({}, transition), {
|
|
1485
1479
|
target: transition.target ? transition.target.map(function (t) {
|
|
1486
|
-
return "#"
|
|
1480
|
+
return "#".concat(t.id);
|
|
1487
1481
|
}) : undefined,
|
|
1488
|
-
source: "#"
|
|
1482
|
+
source: "#".concat(_this.id)
|
|
1489
1483
|
});
|
|
1490
1484
|
}
|
|
1491
1485
|
});
|
|
@@ -1513,7 +1507,7 @@ function () {
|
|
|
1513
1507
|
|
|
1514
1508
|
onConfig = utils.flatten(utils.keys(strictTransitionConfigs_1).map(function (key) {
|
|
1515
1509
|
if (!environment.IS_PRODUCTION && key === NULL_EVENT) {
|
|
1516
|
-
utils.warn(false, "Empty string transition configs (e.g., `{ on: { '': ... }}`) for transient transitions are deprecated. Specify the transition in the `{ always: ... }` property instead. " +
|
|
1510
|
+
utils.warn(false, "Empty string transition configs (e.g., `{ on: { '': ... }}`) for transient transitions are deprecated. Specify the transition in the `{ always: ... }` property instead. " + "Please check the `on` configuration for \"#".concat(_this.id, "\"."));
|
|
1517
1511
|
}
|
|
1518
1512
|
|
|
1519
1513
|
var transitionConfigArray = utils.toTransitionConfigArray(key, strictTransitionConfigs_1[key]);
|
|
@@ -1530,24 +1524,24 @@ function () {
|
|
|
1530
1524
|
var doneConfig = this.config.onDone ? utils.toTransitionConfigArray(String(actions.done(this.id)), this.config.onDone) : [];
|
|
1531
1525
|
|
|
1532
1526
|
if (!environment.IS_PRODUCTION) {
|
|
1533
|
-
utils.warn(!(this.config.onDone && !this.parent), "Root nodes cannot have an \".onDone\" transition. Please check the config of \""
|
|
1527
|
+
utils.warn(!(this.config.onDone && !this.parent), "Root nodes cannot have an \".onDone\" transition. Please check the config of \"".concat(this.id, "\"."));
|
|
1534
1528
|
}
|
|
1535
1529
|
|
|
1536
1530
|
var invokeConfig = utils.flatten(this.invoke.map(function (invokeDef) {
|
|
1537
1531
|
var settleTransitions = [];
|
|
1538
1532
|
|
|
1539
1533
|
if (invokeDef.onDone) {
|
|
1540
|
-
settleTransitions.push.apply(settleTransitions, _tslib.__spreadArray([], _tslib.__read(utils.toTransitionConfigArray(String(actions.doneInvoke(invokeDef.id)), invokeDef.onDone))));
|
|
1534
|
+
settleTransitions.push.apply(settleTransitions, _tslib.__spreadArray([], _tslib.__read(utils.toTransitionConfigArray(String(actions.doneInvoke(invokeDef.id)), invokeDef.onDone)), false));
|
|
1541
1535
|
}
|
|
1542
1536
|
|
|
1543
1537
|
if (invokeDef.onError) {
|
|
1544
|
-
settleTransitions.push.apply(settleTransitions, _tslib.__spreadArray([], _tslib.__read(utils.toTransitionConfigArray(String(actions.error(invokeDef.id)), invokeDef.onError))));
|
|
1538
|
+
settleTransitions.push.apply(settleTransitions, _tslib.__spreadArray([], _tslib.__read(utils.toTransitionConfigArray(String(actions.error(invokeDef.id)), invokeDef.onError)), false));
|
|
1545
1539
|
}
|
|
1546
1540
|
|
|
1547
1541
|
return settleTransitions;
|
|
1548
1542
|
}));
|
|
1549
1543
|
var delayedTransitions = this.after;
|
|
1550
|
-
var formattedTransitions = utils.flatten(_tslib.__spreadArray(_tslib.__spreadArray(_tslib.__spreadArray(_tslib.__spreadArray([], _tslib.__read(doneConfig)), _tslib.__read(invokeConfig)), _tslib.__read(onConfig)), _tslib.__read(eventlessConfig)).map(function (transitionConfig) {
|
|
1544
|
+
var formattedTransitions = utils.flatten(_tslib.__spreadArray(_tslib.__spreadArray(_tslib.__spreadArray(_tslib.__spreadArray([], _tslib.__read(doneConfig), false), _tslib.__read(invokeConfig), false), _tslib.__read(onConfig), false), _tslib.__read(eventlessConfig), false).map(function (transitionConfig) {
|
|
1551
1545
|
return utils.toArray(transitionConfig).map(function (transition) {
|
|
1552
1546
|
return _this.formatTransition(transition);
|
|
1553
1547
|
});
|
package/lib/_virtual/_tslib.js
CHANGED
|
@@ -69,10 +69,14 @@ function __read(o, n) {
|
|
|
69
69
|
return ar;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
function __spreadArray(to, from) {
|
|
73
|
-
for (var i = 0,
|
|
74
|
-
|
|
75
|
-
|
|
72
|
+
function __spreadArray(to, from, pack) {
|
|
73
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
74
|
+
if (ar || !(i in from)) {
|
|
75
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
76
|
+
ar[i] = from[i];
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
76
80
|
}
|
|
77
81
|
|
|
78
82
|
exports.__read = __read;
|
package/lib/actions.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { Action, Event, EventObject, SingleOrArray, SendAction, SendActionOptions, CancelAction, ActionObject, ActionType, Assigner, PropertyAssigner, AssignAction, ActionFunction, ActionFunctionMap, ActivityActionObject, ActionTypes, ActivityDefinition, RaiseAction, RaiseActionObject, DoneEvent, ErrorPlatformEvent, DoneEventObject, SendExpr, SendActionObject, PureAction, LogExpr, LogAction, LogActionObject, DelayFunctionMap, SCXML, ExprWithMeta, ChooseCondition, ChooseAction, AnyEventObject, Expr,
|
|
1
|
+
import { Action, Event, EventObject, SingleOrArray, SendAction, SendActionOptions, CancelAction, ActionObject, ActionType, Assigner, PropertyAssigner, AssignAction, ActionFunction, ActionFunctionMap, ActivityActionObject, ActionTypes, ActivityDefinition, RaiseAction, RaiseActionObject, DoneEvent, ErrorPlatformEvent, DoneEventObject, SendExpr, SendActionObject, PureAction, LogExpr, LogAction, LogActionObject, DelayFunctionMap, SCXML, ExprWithMeta, ChooseCondition, ChooseAction, AnyEventObject, Expr, Cast } from './types';
|
|
2
2
|
import * as actionTypes from './actionTypes';
|
|
3
3
|
import { State } from './State';
|
|
4
4
|
import { StateNode } from './StateNode';
|
|
5
|
+
import { ActorRef, EventFrom, StopAction, StopActionObject } from '.';
|
|
5
6
|
export { actionTypes };
|
|
6
7
|
export declare const initEvent: SCXML.Event<{
|
|
7
8
|
type: ActionTypes;
|
|
8
9
|
}>;
|
|
9
10
|
export declare function getActionFunction<TContext, TEvent extends EventObject>(actionType: ActionType, actionFunctionMap?: ActionFunctionMap<TContext, TEvent>): ActionObject<TContext, TEvent> | ActionFunction<TContext, TEvent> | undefined;
|
|
10
11
|
export declare function toActionObject<TContext, TEvent extends EventObject>(action: Action<TContext, TEvent>, actionFunctionMap?: ActionFunctionMap<TContext, TEvent>): ActionObject<TContext, TEvent>;
|
|
11
|
-
export declare const toActionObjects: <TContext, TEvent extends EventObject>(action?: SingleOrArray<Action<TContext, TEvent>> | undefined, actionFunctionMap?: ActionFunctionMap<TContext, TEvent,
|
|
12
|
+
export declare const toActionObjects: <TContext, TEvent extends EventObject>(action?: SingleOrArray<Action<TContext, TEvent>> | undefined, actionFunctionMap?: ActionFunctionMap<TContext, TEvent, ActionObject<TContext, TEvent>> | undefined) => ActionObject<TContext, TEvent>[];
|
|
12
13
|
export declare function toActivityDefinition<TContext, TEvent extends EventObject>(action: string | ActivityDefinition<TContext, TEvent>): ActivityDefinition<TContext, TEvent>;
|
|
13
14
|
/**
|
|
14
15
|
* Raises an event. This places the event in the internal event queue, so that
|
|
@@ -37,6 +38,22 @@ export declare function resolveSend<TContext, TEvent extends EventObject, TSentE
|
|
|
37
38
|
* @param options Options to pass into the send event.
|
|
38
39
|
*/
|
|
39
40
|
export declare function sendParent<TContext, TEvent extends EventObject, TSentEvent extends EventObject = AnyEventObject>(event: Event<TSentEvent> | SendExpr<TContext, TEvent, TSentEvent>, options?: SendActionOptions<TContext, TEvent>): SendAction<TContext, TEvent, TSentEvent>;
|
|
41
|
+
declare type InferEvent<E extends EventObject> = {
|
|
42
|
+
[T in E['type']]: {
|
|
43
|
+
type: T;
|
|
44
|
+
} & Extract<E, {
|
|
45
|
+
type: T;
|
|
46
|
+
}>;
|
|
47
|
+
}[E['type']];
|
|
48
|
+
/**
|
|
49
|
+
* Sends an event to an actor.
|
|
50
|
+
*
|
|
51
|
+
* @param actor The `ActorRef` to send the event to.
|
|
52
|
+
* @param event The event to send, or an expression that evaluates to the event to send
|
|
53
|
+
* @param options Send action options
|
|
54
|
+
* @returns An XState send action object
|
|
55
|
+
*/
|
|
56
|
+
export declare function sendTo<TContext, TEvent extends EventObject, TActor extends ActorRef<EventObject>>(actor: (ctx: TContext) => TActor, event: EventFrom<TActor> | SendExpr<TContext, TEvent, InferEvent<Cast<EventFrom<TActor>, EventObject>>>, options?: SendActionOptions<TContext, TEvent>): SendAction<TContext, TEvent, any>;
|
|
40
57
|
/**
|
|
41
58
|
* Sends an update event to this machine's parent.
|
|
42
59
|
*/
|
|
@@ -134,5 +151,5 @@ export declare function forwardTo<TContext, TEvent extends EventObject>(target:
|
|
|
134
151
|
*/
|
|
135
152
|
export declare function escalate<TContext, TEvent extends EventObject, TErrorData = any>(errorData: TErrorData | ExprWithMeta<TContext, TEvent, TErrorData>, options?: SendActionOptions<TContext, TEvent>): SendAction<TContext, TEvent, AnyEventObject>;
|
|
136
153
|
export declare function choose<TContext, TEvent extends EventObject>(conds: Array<ChooseCondition<TContext, TEvent>>): ChooseAction<TContext, TEvent>;
|
|
137
|
-
export declare function resolveActions<TContext, TEvent extends EventObject>(machine: StateNode<TContext, any, TEvent, any
|
|
154
|
+
export declare function resolveActions<TContext, TEvent extends EventObject>(machine: StateNode<TContext, any, TEvent, any>, currentState: State<TContext, TEvent> | undefined, currentContext: TContext, _event: SCXML.Event<TEvent>, actions: Array<ActionObject<TContext, TEvent>>, preserveActionOrder?: boolean): [Array<ActionObject<TContext, TEvent>>, TContext];
|
|
138
155
|
//# sourceMappingURL=actions.d.ts.map
|
package/lib/actions.js
CHANGED
|
@@ -287,8 +287,8 @@ var assign = function (assignment) {
|
|
|
287
287
|
*/
|
|
288
288
|
|
|
289
289
|
function after(delayRef, id) {
|
|
290
|
-
var idSuffix = id ? "#"
|
|
291
|
-
return types.ActionTypes.After
|
|
290
|
+
var idSuffix = id ? "#".concat(id) : '';
|
|
291
|
+
return "".concat(types.ActionTypes.After, "(").concat(delayRef, ")").concat(idSuffix);
|
|
292
292
|
}
|
|
293
293
|
/**
|
|
294
294
|
* Returns an event that represents that a final state node
|
|
@@ -299,7 +299,7 @@ function after(delayRef, id) {
|
|
|
299
299
|
*/
|
|
300
300
|
|
|
301
301
|
function done(id, data) {
|
|
302
|
-
var type = types.ActionTypes.DoneState
|
|
302
|
+
var type = "".concat(types.ActionTypes.DoneState, ".").concat(id);
|
|
303
303
|
var eventObject = {
|
|
304
304
|
type: type,
|
|
305
305
|
data: data
|
|
@@ -322,7 +322,7 @@ function done(id, data) {
|
|
|
322
322
|
*/
|
|
323
323
|
|
|
324
324
|
function doneInvoke(id, data) {
|
|
325
|
-
var type = types.ActionTypes.DoneInvoke
|
|
325
|
+
var type = "".concat(types.ActionTypes.DoneInvoke, ".").concat(id);
|
|
326
326
|
var eventObject = {
|
|
327
327
|
type: type,
|
|
328
328
|
data: data
|
|
@@ -335,7 +335,7 @@ function doneInvoke(id, data) {
|
|
|
335
335
|
return eventObject;
|
|
336
336
|
}
|
|
337
337
|
function error(id, data) {
|
|
338
|
-
var type = types.ActionTypes.ErrorPlatform
|
|
338
|
+
var type = "".concat(types.ActionTypes.ErrorPlatform, ".").concat(id);
|
|
339
339
|
var eventObject = {
|
|
340
340
|
type: type,
|
|
341
341
|
data: data
|
|
@@ -417,7 +417,7 @@ function resolveActions(machine, currentState, currentContext, _event, actions,
|
|
|
417
417
|
if (!environment.IS_PRODUCTION) {
|
|
418
418
|
// warn after resolving as we can create better contextual message here
|
|
419
419
|
utils.warn(!utils.isString(actionObject.delay) || typeof sendAction.delay === 'number', // tslint:disable-next-line:max-line-length
|
|
420
|
-
"No delay reference for delay expression '"
|
|
420
|
+
"No delay reference for delay expression '".concat(actionObject.delay, "' was found on machine '").concat(machine.id, "'"));
|
|
421
421
|
}
|
|
422
422
|
|
|
423
423
|
return sendAction;
|
|
@@ -489,7 +489,7 @@ function resolveActions(machine, currentState, currentContext, _event, actions,
|
|
|
489
489
|
args[_i - 1] = arguments[_i];
|
|
490
490
|
}
|
|
491
491
|
|
|
492
|
-
exec_1.apply(void 0, _tslib.__spreadArray([preservedContexts[contextIndex_1]], _tslib.__read(args)));
|
|
492
|
+
exec_1.apply(void 0, _tslib.__spreadArray([preservedContexts[contextIndex_1]], _tslib.__read(args), false));
|
|
493
493
|
}
|
|
494
494
|
});
|
|
495
495
|
}
|
package/lib/behaviors.d.ts
CHANGED
package/lib/devTools.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { Interpreter } from '.';
|
|
2
2
|
import { AnyInterpreter } from './types';
|
|
3
|
-
import { Interpreter } from './interpreter';
|
|
4
3
|
declare type ServiceListener = (service: AnyInterpreter) => void;
|
|
5
4
|
export interface XStateDevInterface {
|
|
6
5
|
register: (service: Interpreter<any>) => void;
|
|
@@ -10,7 +9,7 @@ export interface XStateDevInterface {
|
|
|
10
9
|
};
|
|
11
10
|
services: Set<Interpreter<any>>;
|
|
12
11
|
}
|
|
13
|
-
export declare function getGlobal():
|
|
12
|
+
export declare function getGlobal(): typeof globalThis | undefined;
|
|
14
13
|
export declare function registerService(service: AnyInterpreter): void;
|
|
15
14
|
export {};
|
|
16
15
|
//# sourceMappingURL=devTools.d.ts.map
|
package/lib/devTools.js
CHANGED
|
@@ -4,6 +4,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
// From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis
|
|
6
6
|
function getGlobal() {
|
|
7
|
+
if (typeof globalThis !== 'undefined') {
|
|
8
|
+
return globalThis;
|
|
9
|
+
}
|
|
10
|
+
|
|
7
11
|
if (typeof self !== 'undefined') {
|
|
8
12
|
return self;
|
|
9
13
|
}
|
package/lib/each.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventObject, SingleOrArray, ActionObject } from '
|
|
1
|
+
import { EventObject, SingleOrArray, ActionObject } from '.';
|
|
2
2
|
export declare function each<TContext, TEvent extends EventObject>(collection: keyof TContext, item: keyof TContext, actions: SingleOrArray<ActionObject<TContext, TEvent>>): ActionObject<TContext, TEvent>;
|
|
3
3
|
export declare function each<TContext, TEvent extends EventObject>(collection: keyof TContext, item: keyof TContext, index: keyof TContext, actions: SingleOrArray<ActionObject<TContext, TEvent>>): ActionObject<TContext, TEvent>;
|
|
4
4
|
//# sourceMappingURL=each.d.ts.map
|
package/lib/index.d.ts
CHANGED
|
@@ -28,5 +28,4 @@ declare const actions: {
|
|
|
28
28
|
};
|
|
29
29
|
export { Actor, Machine, StateNode, State, matchesState, mapState, actions, assign, send, sendParent, sendUpdate, forwardTo, interpret, Interpreter, InterpreterStatus, matchState, spawn, doneInvoke, createMachine, createSchema };
|
|
30
30
|
export * from './types';
|
|
31
|
-
export * from './typegenTypes';
|
|
32
31
|
//# sourceMappingURL=index.d.ts.map
|