xstate 5.8.1 → 5.8.2
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/actions/dist/xstate-actions.cjs.js +1 -1
- package/actions/dist/xstate-actions.development.cjs.js +1 -1
- package/actions/dist/xstate-actions.development.esm.js +1 -1
- package/actions/dist/xstate-actions.esm.js +1 -1
- package/actions/dist/xstate-actions.umd.min.js.map +1 -1
- package/dist/declarations/src/actions/send.d.ts +2 -2
- package/dist/{log-caeb9fa9.cjs.js → log-12b88b7e.cjs.js} +2 -2
- package/dist/{log-d6ba5166.development.esm.js → log-abca6761.development.esm.js} +2 -2
- package/dist/{log-666fd90a.esm.js → log-ac1ff860.esm.js} +2 -2
- package/dist/{log-3f27f22f.development.cjs.js → log-e73cded6.development.cjs.js} +2 -2
- package/dist/xstate.cjs.js +1 -1
- package/dist/xstate.development.cjs.js +1 -1
- package/dist/xstate.development.esm.js +2 -2
- package/dist/xstate.esm.js +2 -2
- package/dist/xstate.umd.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -19,7 +19,7 @@ export declare function sendTo<TContext extends MachineContext, TExpressionEvent
|
|
|
19
19
|
* @param event The event to send to the parent machine.
|
|
20
20
|
* @param options Options to pass into the send event.
|
|
21
21
|
*/
|
|
22
|
-
export declare function sendParent<TContext extends MachineContext, TExpressionEvent extends EventObject, TParams extends ParameterizedObject['params'] | undefined, TSentEvent extends EventObject = AnyEventObject, TEvent extends EventObject = AnyEventObject, TDelay extends string =
|
|
22
|
+
export declare function sendParent<TContext extends MachineContext, TExpressionEvent extends EventObject, TParams extends ParameterizedObject['params'] | undefined, TSentEvent extends EventObject = AnyEventObject, TEvent extends EventObject = AnyEventObject, TDelay extends string = never, TUsedDelay extends TDelay = never>(event: TSentEvent | SendExpr<TContext, TExpressionEvent, TParams, TSentEvent, TEvent>, options?: SendToActionOptions<TContext, TExpressionEvent, TParams, TEvent, TUsedDelay>): ActionFunction<TContext, TExpressionEvent, TEvent, TParams, never, never, never, TDelay>;
|
|
23
23
|
type Target<TContext extends MachineContext, TExpressionEvent extends EventObject, TParams extends ParameterizedObject['params'] | undefined, TEvent extends EventObject> = string | ActorRef<any, any> | ((args: ActionArgs<TContext, TExpressionEvent, TEvent>, params: TParams) => string | ActorRef<any, any>);
|
|
24
24
|
/**
|
|
25
25
|
* Forwards (sends) an event to the `target` actor.
|
|
@@ -27,5 +27,5 @@ type Target<TContext extends MachineContext, TExpressionEvent extends EventObjec
|
|
|
27
27
|
* @param target The target actor to forward the event to.
|
|
28
28
|
* @param options Options to pass into the send action creator.
|
|
29
29
|
*/
|
|
30
|
-
export declare function forwardTo<TContext extends MachineContext, TExpressionEvent extends EventObject, TParams extends ParameterizedObject['params'] | undefined, TEvent extends EventObject, TDelay extends string>(target: Target<TContext, TExpressionEvent, TParams, TEvent>, options?: SendToActionOptions<TContext, TExpressionEvent, TParams, TEvent,
|
|
30
|
+
export declare function forwardTo<TContext extends MachineContext, TExpressionEvent extends EventObject, TParams extends ParameterizedObject['params'] | undefined, TEvent extends EventObject, TDelay extends string = never, TUsedDelay extends TDelay = never>(target: Target<TContext, TExpressionEvent, TParams, TEvent>, options?: SendToActionOptions<TContext, TExpressionEvent, TParams, TEvent, TUsedDelay>): ActionFunction<TContext, TExpressionEvent, TEvent, TParams, never, never, never, TDelay>;
|
|
31
31
|
export {};
|
|
@@ -325,12 +325,12 @@ function resolveEnqueueActions(actorScope, snapshot, args, _actionParams, {
|
|
|
325
325
|
actions.push(guards_dist_xstateGuards.cancel(...args));
|
|
326
326
|
};
|
|
327
327
|
enqueue.raise = (...args) => {
|
|
328
|
-
// for some reason it fails to infer `TDelay` from `...args` here and
|
|
328
|
+
// for some reason it fails to infer `TDelay` from `...args` here and picks its default (`never`)
|
|
329
329
|
// then it fails to typecheck that because `...args` use `string` in place of `TDelay`
|
|
330
330
|
actions.push(guards_dist_xstateGuards.raise(...args));
|
|
331
331
|
};
|
|
332
332
|
enqueue.sendTo = (...args) => {
|
|
333
|
-
// for some reason it fails to infer `TDelay` from `...args` here and
|
|
333
|
+
// for some reason it fails to infer `TDelay` from `...args` here and picks its default (`never`)
|
|
334
334
|
// then it fails to typecheck that because `...args` use `string` in place of `TDelay
|
|
335
335
|
actions.push(sendTo(...args));
|
|
336
336
|
};
|
|
@@ -339,12 +339,12 @@ function resolveEnqueueActions(actorScope, snapshot, args, _actionParams, {
|
|
|
339
339
|
actions.push(cancel(...args));
|
|
340
340
|
};
|
|
341
341
|
enqueue.raise = (...args) => {
|
|
342
|
-
// for some reason it fails to infer `TDelay` from `...args` here and
|
|
342
|
+
// for some reason it fails to infer `TDelay` from `...args` here and picks its default (`never`)
|
|
343
343
|
// then it fails to typecheck that because `...args` use `string` in place of `TDelay`
|
|
344
344
|
actions.push(raise(...args));
|
|
345
345
|
};
|
|
346
346
|
enqueue.sendTo = (...args) => {
|
|
347
|
-
// for some reason it fails to infer `TDelay` from `...args` here and
|
|
347
|
+
// for some reason it fails to infer `TDelay` from `...args` here and picks its default (`never`)
|
|
348
348
|
// then it fails to typecheck that because `...args` use `string` in place of `TDelay
|
|
349
349
|
actions.push(sendTo(...args));
|
|
350
350
|
};
|
|
@@ -323,12 +323,12 @@ function resolveEnqueueActions(actorScope, snapshot, args, _actionParams, {
|
|
|
323
323
|
actions.push(cancel(...args));
|
|
324
324
|
};
|
|
325
325
|
enqueue.raise = (...args) => {
|
|
326
|
-
// for some reason it fails to infer `TDelay` from `...args` here and
|
|
326
|
+
// for some reason it fails to infer `TDelay` from `...args` here and picks its default (`never`)
|
|
327
327
|
// then it fails to typecheck that because `...args` use `string` in place of `TDelay`
|
|
328
328
|
actions.push(raise(...args));
|
|
329
329
|
};
|
|
330
330
|
enqueue.sendTo = (...args) => {
|
|
331
|
-
// for some reason it fails to infer `TDelay` from `...args` here and
|
|
331
|
+
// for some reason it fails to infer `TDelay` from `...args` here and picks its default (`never`)
|
|
332
332
|
// then it fails to typecheck that because `...args` use `string` in place of `TDelay
|
|
333
333
|
actions.push(sendTo(...args));
|
|
334
334
|
};
|
|
@@ -341,12 +341,12 @@ function resolveEnqueueActions(actorScope, snapshot, args, _actionParams, {
|
|
|
341
341
|
actions.push(guards_dist_xstateGuards.cancel(...args));
|
|
342
342
|
};
|
|
343
343
|
enqueue.raise = (...args) => {
|
|
344
|
-
// for some reason it fails to infer `TDelay` from `...args` here and
|
|
344
|
+
// for some reason it fails to infer `TDelay` from `...args` here and picks its default (`never`)
|
|
345
345
|
// then it fails to typecheck that because `...args` use `string` in place of `TDelay`
|
|
346
346
|
actions.push(guards_dist_xstateGuards.raise(...args));
|
|
347
347
|
};
|
|
348
348
|
enqueue.sendTo = (...args) => {
|
|
349
|
-
// for some reason it fails to infer `TDelay` from `...args` here and
|
|
349
|
+
// for some reason it fails to infer `TDelay` from `...args` here and picks its default (`never`)
|
|
350
350
|
// then it fails to typecheck that because `...args` use `string` in place of `TDelay
|
|
351
351
|
actions.push(sendTo(...args));
|
|
352
352
|
};
|
package/dist/xstate.cjs.js
CHANGED
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var actors_dist_xstateActors = require('../actors/dist/xstate-actors.cjs.js');
|
|
6
6
|
var guards_dist_xstateGuards = require('./raise-af6a698b.cjs.js');
|
|
7
|
-
var log = require('./log-
|
|
7
|
+
var log = require('./log-12b88b7e.cjs.js');
|
|
8
8
|
require('../dev/dist/xstate-dev.cjs.js');
|
|
9
9
|
|
|
10
10
|
class SimulatedClock {
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var actors_dist_xstateActors = require('../actors/dist/xstate-actors.development.cjs.js');
|
|
6
6
|
var guards_dist_xstateGuards = require('./raise-7132462e.development.cjs.js');
|
|
7
|
-
var log = require('./log-
|
|
7
|
+
var log = require('./log-e73cded6.development.cjs.js');
|
|
8
8
|
require('../dev/dist/xstate-dev.development.cjs.js');
|
|
9
9
|
|
|
10
10
|
class SimulatedClock {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { createEmptyActor, fromCallback, fromEventObservable, fromObservable, fromPromise, fromTransition } from '../actors/dist/xstate-actors.development.esm.js';
|
|
2
2
|
import { S as STATE_DELIMITER, m as mapValues, t as toArray, f as formatTransitions, a as toTransitionConfigArray, b as formatTransition, N as NULL_EVENT, e as evaluateGuard, c as createInvokeId, g as getDelayedTransitions, d as formatInitialTransition, h as getCandidates, r as resolveStateValue, i as getAllStateNodes, j as getStateNodes, k as createMachineSnapshot, l as isInFinalState, n as macrostep, o as transitionNode, p as resolveActionsAndContext, q as createInitEvent, s as microstep, u as getInitialStateNodes, v as toStatePath, w as isStateId, x as getStateNodeByPath, y as getPersistedSnapshot, z as resolveReferencedActor, A as createActor, $ as $$ACTOR_TYPE } from './raise-3f85f1d9.development.esm.js';
|
|
3
3
|
export { B as Actor, I as __unsafe_getAllOwnEventDescriptors, E as and, M as cancel, A as createActor, j as getStateNodes, C as interpret, D as isMachineSnapshot, J as matchesState, F as not, G as or, K as pathToStateValue, O as raise, P as spawnChild, H as stateIn, Q as stop, R as stopChild, L as toObserver } from './raise-3f85f1d9.development.esm.js';
|
|
4
|
-
import { a as assign } from './log-
|
|
5
|
-
export { S as SpecialTargets, a as assign, e as enqueueActions, f as forwardTo, l as log, s as sendParent, b as sendTo } from './log-
|
|
4
|
+
import { a as assign } from './log-abca6761.development.esm.js';
|
|
5
|
+
export { S as SpecialTargets, a as assign, e as enqueueActions, f as forwardTo, l as log, s as sendParent, b as sendTo } from './log-abca6761.development.esm.js';
|
|
6
6
|
import '../dev/dist/xstate-dev.development.esm.js';
|
|
7
7
|
|
|
8
8
|
class SimulatedClock {
|
package/dist/xstate.esm.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { createEmptyActor, fromCallback, fromEventObservable, fromObservable, fromPromise, fromTransition } from '../actors/dist/xstate-actors.esm.js';
|
|
2
2
|
import { S as STATE_DELIMITER, m as mapValues, t as toArray, f as formatTransitions, a as toTransitionConfigArray, b as formatTransition, N as NULL_EVENT, e as evaluateGuard, c as createInvokeId, g as getDelayedTransitions, d as formatInitialTransition, h as getCandidates, r as resolveStateValue, i as getAllStateNodes, j as getStateNodes, k as createMachineSnapshot, l as isInFinalState, n as macrostep, o as transitionNode, p as resolveActionsAndContext, q as createInitEvent, s as microstep, u as getInitialStateNodes, v as toStatePath, w as isStateId, x as getStateNodeByPath, y as getPersistedSnapshot, z as resolveReferencedActor, A as createActor, $ as $$ACTOR_TYPE } from './raise-a7ab421f.esm.js';
|
|
3
3
|
export { B as Actor, I as __unsafe_getAllOwnEventDescriptors, E as and, M as cancel, A as createActor, j as getStateNodes, C as interpret, D as isMachineSnapshot, J as matchesState, F as not, G as or, K as pathToStateValue, O as raise, P as spawnChild, H as stateIn, Q as stop, R as stopChild, L as toObserver } from './raise-a7ab421f.esm.js';
|
|
4
|
-
import { a as assign } from './log-
|
|
5
|
-
export { S as SpecialTargets, a as assign, e as enqueueActions, f as forwardTo, l as log, s as sendParent, b as sendTo } from './log-
|
|
4
|
+
import { a as assign } from './log-ac1ff860.esm.js';
|
|
5
|
+
export { S as SpecialTargets, a as assign, e as enqueueActions, f as forwardTo, l as log, s as sendParent, b as sendTo } from './log-ac1ff860.esm.js';
|
|
6
6
|
import '../dev/dist/xstate-dev.esm.js';
|
|
7
7
|
|
|
8
8
|
class SimulatedClock {
|