xstate 5.18.1 → 5.19.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/actions/dist/xstate-actions.cjs.d.mts +1 -1
- package/actions/dist/xstate-actions.cjs.d.ts +1 -1
- package/actions/dist/xstate-actions.cjs.js +2 -2
- package/actions/dist/xstate-actions.development.cjs.js +2 -2
- package/actions/dist/xstate-actions.development.esm.js +2 -2
- package/actions/dist/xstate-actions.esm.js +2 -2
- package/actions/dist/xstate-actions.umd.min.js +1 -1
- package/actions/dist/xstate-actions.umd.min.js.map +1 -1
- package/actors/dist/xstate-actors.cjs.d.mts +1 -1
- package/actors/dist/xstate-actors.cjs.d.ts +1 -1
- package/actors/dist/xstate-actors.cjs.js +1 -1
- package/actors/dist/xstate-actors.development.cjs.js +1 -1
- package/actors/dist/xstate-actors.development.esm.js +1 -1
- package/actors/dist/xstate-actors.esm.js +1 -1
- package/actors/dist/xstate-actors.umd.min.js +1 -1
- package/actors/dist/xstate-actors.umd.min.js.map +1 -1
- package/dev/dist/xstate-dev.cjs.d.mts +1 -1
- package/dev/dist/xstate-dev.cjs.d.ts +1 -1
- package/dev/dist/xstate-dev.cjs.js +1 -1
- package/dev/dist/xstate-dev.development.cjs.js +1 -1
- package/dev/dist/xstate-dev.development.esm.js +1 -1
- package/dev/dist/xstate-dev.esm.js +1 -1
- package/dev/dist/xstate-dev.umd.min.js.map +1 -1
- package/dist/declarations/src/State.d.ts +1 -1
- package/dist/declarations/src/actions/raise.d.ts +9 -1
- package/dist/declarations/src/actions/send.d.ts +10 -1
- package/dist/declarations/src/createActor.d.ts +2 -1
- package/dist/declarations/src/getNextSnapshot.d.ts +2 -0
- package/dist/declarations/src/index.d.ts +1 -0
- package/dist/declarations/src/inspection.d.ts +3 -3
- package/dist/declarations/src/stateUtils.d.ts +17 -7
- package/dist/declarations/src/transition.d.ts +16 -0
- package/dist/declarations/src/types.d.ts +47 -14
- package/dist/declarations/src/utils.d.ts +1 -1
- package/dist/{log-d26be77d.development.cjs.js → log-17337367.development.cjs.js} +29 -19
- package/dist/{log-a2c94240.esm.js → log-2a773d37.esm.js} +28 -15
- package/dist/{log-098d2ed5.cjs.js → log-b0ee96de.cjs.js} +28 -15
- package/dist/{log-c92a07bc.development.esm.js → log-ef30c65f.development.esm.js} +29 -19
- package/dist/{raise-206d3d29.development.esm.js → raise-1db27a82.development.esm.js} +98 -73
- package/dist/{raise-830a98f7.development.cjs.js → raise-4acdb210.development.cjs.js} +98 -73
- package/dist/{raise-cde45f56.cjs.js → raise-60cebf03.cjs.js} +94 -71
- package/dist/{raise-c0e3c984.esm.js → raise-c17ec2bc.esm.js} +94 -71
- package/dist/xstate.cjs.d.mts +1 -1
- package/dist/xstate.cjs.d.ts +1 -1
- package/dist/xstate.cjs.js +60 -16
- package/dist/xstate.cjs.mjs +2 -0
- package/dist/xstate.development.cjs.js +60 -16
- package/dist/xstate.development.cjs.mjs +2 -0
- package/dist/xstate.development.esm.js +61 -19
- package/dist/xstate.esm.js +61 -19
- package/dist/xstate.umd.min.js +1 -1
- package/dist/xstate.umd.min.js.map +1 -1
- package/guards/dist/xstate-guards.cjs.d.mts +1 -1
- package/guards/dist/xstate-guards.cjs.d.ts +1 -1
- package/guards/dist/xstate-guards.cjs.js +1 -1
- package/guards/dist/xstate-guards.development.cjs.js +1 -1
- package/guards/dist/xstate-guards.development.esm.js +1 -1
- package/guards/dist/xstate-guards.esm.js +1 -1
- package/guards/dist/xstate-guards.umd.min.js +1 -1
- package/guards/dist/xstate-guards.umd.min.js.map +1 -1
- package/package.json +7 -7
- package/actions/dist/xstate-actions.cjs.d.mts.map +0 -1
- package/actions/dist/xstate-actions.cjs.d.ts.map +0 -1
- package/actors/dist/xstate-actors.cjs.d.mts.map +0 -1
- package/actors/dist/xstate-actors.cjs.d.ts.map +0 -1
- package/dev/dist/xstate-dev.cjs.d.mts.map +0 -1
- package/dev/dist/xstate-dev.cjs.d.ts.map +0 -1
- package/dist/xstate.cjs.d.mts.map +0 -1
- package/dist/xstate.cjs.d.ts.map +0 -1
- package/guards/dist/xstate-guards.cjs.d.mts.map +0 -1
- package/guards/dist/xstate-guards.cjs.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xstate-dev.umd.min.js","sources":["../../src/dev/index.ts"],"sourcesContent":["import isDevelopment from '#is-development';\nimport { AnyActor, DevToolsAdapter } from '../types.ts';\n\ninterface DevInterface {\n services: Set<AnyActor>;\n register(service: AnyActor): void;\n onRegister(listener: ServiceListener): void;\n}\ntype ServiceListener = (service: AnyActor) => void;\n\nexport interface XStateDevInterface {\n register: (service: AnyActor) => void;\n unregister: (service: AnyActor) => void;\n onRegister: (listener: ServiceListener) => {\n unsubscribe: () => void;\n };\n services: Set<AnyActor>;\n}\n\n// From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis\nexport function getGlobal(): typeof globalThis | undefined {\n if (typeof globalThis !== 'undefined') {\n return globalThis;\n }\n if (typeof self !== 'undefined') {\n return self;\n }\n if (typeof window !== 'undefined') {\n return window;\n }\n if (typeof global !== 'undefined') {\n return global;\n }\n if (isDevelopment) {\n console.warn(\n 'XState could not find a global object in this environment. Please let the maintainers know and raise an issue here: https://github.com/statelyai/xstate/issues'\n );\n }\n}\n\nfunction getDevTools(): DevInterface | undefined {\n const w = getGlobal();\n if (
|
|
1
|
+
{"version":3,"file":"xstate-dev.umd.min.js","sources":["../../src/dev/index.ts"],"sourcesContent":["import isDevelopment from '#is-development';\nimport { AnyActor, DevToolsAdapter } from '../types.ts';\n\ninterface DevInterface {\n services: Set<AnyActor>;\n register(service: AnyActor): void;\n onRegister(listener: ServiceListener): void;\n}\ntype ServiceListener = (service: AnyActor) => void;\n\nexport interface XStateDevInterface {\n register: (service: AnyActor) => void;\n unregister: (service: AnyActor) => void;\n onRegister: (listener: ServiceListener) => {\n unsubscribe: () => void;\n };\n services: Set<AnyActor>;\n}\n\n// From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis\nexport function getGlobal(): typeof globalThis | undefined {\n if (typeof globalThis !== 'undefined') {\n return globalThis;\n }\n if (typeof self !== 'undefined') {\n return self;\n }\n if (typeof window !== 'undefined') {\n return window;\n }\n if (typeof global !== 'undefined') {\n return global;\n }\n if (isDevelopment) {\n console.warn(\n 'XState could not find a global object in this environment. Please let the maintainers know and raise an issue here: https://github.com/statelyai/xstate/issues'\n );\n }\n}\n\nfunction getDevTools(): DevInterface | undefined {\n const w = getGlobal();\n if ((w as any).__xstate__) {\n return (w as any).__xstate__;\n }\n\n return undefined;\n}\n\nexport function registerService(service: AnyActor) {\n if (typeof window === 'undefined') {\n return;\n }\n\n const devTools = getDevTools();\n\n if (devTools) {\n devTools.register(service);\n }\n}\n\nexport const devToolsAdapter: DevToolsAdapter = (service) => {\n if (typeof window === 'undefined') {\n return;\n }\n\n const devTools = getDevTools();\n\n if (devTools) {\n devTools.register(service);\n }\n};\n"],"names":["getGlobal","globalThis","self","window","getDevTools","w","__xstate__","service","devTools","register"],"mappings":"iPAoBO,SAASA,IACd,MAA0B,oBAAfC,WACFA,WAEW,oBAATC,KACFA,KAGAC,MAUX,CAEA,SAASC,IACP,MAAMC,EAAIL,IACV,GAAKK,EAAUC,WACb,OAAQD,EAAUC,UAItB,mBAciDC,IAK/C,MAAMC,EAAWJ,IAEbI,GACFA,EAASC,SAASF,EACpB,kCArBK,SAAyBA,GAK9B,MAAMC,EAAWJ,IAEbI,GACFA,EAASC,SAASF,EAEtB"}
|
|
@@ -4,7 +4,7 @@ import type { ProvidedActor, AnyMachineSnapshot, AnyStateMachine, EventObject, H
|
|
|
4
4
|
type ToTestStateValue<TStateValue extends StateValue> = TStateValue extends string ? TStateValue : IsNever<keyof TStateValue> extends true ? never : keyof TStateValue | {
|
|
5
5
|
[K in keyof TStateValue]?: ToTestStateValue<NonNullable<TStateValue[K]>>;
|
|
6
6
|
};
|
|
7
|
-
export declare function isMachineSnapshot
|
|
7
|
+
export declare function isMachineSnapshot(value: unknown): value is AnyMachineSnapshot;
|
|
8
8
|
interface MachineSnapshotBase<TContext extends MachineContext, TEvent extends EventObject, TChildren extends Record<string, AnyActorRef | undefined>, TStateValue extends StateValue, TTag extends string, TOutput, TMeta, TStateSchema extends StateSchema = StateSchema> {
|
|
9
9
|
/** The state machine that produced this state snapshot. */
|
|
10
10
|
machine: StateMachine<TContext, TEvent, TChildren, ProvidedActor, ParameterizedObject, ParameterizedObject, string, TStateValue, TTag, unknown, TOutput, EventObject, // TEmitted
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ActionArgs, ActionFunction, DoNotInfer, EventObject, MachineContext, ParameterizedObject, RaiseActionOptions, SendExpr } from "../types.js";
|
|
1
|
+
import { ActionArgs, ActionFunction, DoNotInfer, EventObject, ExecutableActionObject, MachineContext, ParameterizedObject, RaiseActionOptions, SendExpr } from "../types.js";
|
|
2
2
|
export interface RaiseAction<TContext extends MachineContext, TExpressionEvent extends EventObject, TParams extends ParameterizedObject['params'] | undefined, TEvent extends EventObject, TDelay extends string> {
|
|
3
3
|
(args: ActionArgs<TContext, TExpressionEvent, TEvent>, params: TParams): void;
|
|
4
4
|
_out_TEvent?: TEvent;
|
|
@@ -11,3 +11,11 @@ export interface RaiseAction<TContext extends MachineContext, TExpressionEvent e
|
|
|
11
11
|
* @param eventType The event to raise.
|
|
12
12
|
*/
|
|
13
13
|
export declare function raise<TContext extends MachineContext, TExpressionEvent extends EventObject, TEvent extends EventObject, TParams extends ParameterizedObject['params'] | undefined, TDelay extends string = never, TUsedDelay extends TDelay = never>(eventOrExpr: DoNotInfer<TEvent> | SendExpr<TContext, TExpressionEvent, TParams, DoNotInfer<TEvent>, TEvent>, options?: RaiseActionOptions<TContext, TExpressionEvent, TParams, DoNotInfer<TEvent>, TUsedDelay>): ActionFunction<TContext, TExpressionEvent, TEvent, TParams, never, never, never, TDelay, never>;
|
|
14
|
+
export interface ExecutableRaiseAction extends ExecutableActionObject {
|
|
15
|
+
type: 'xstate.raise';
|
|
16
|
+
params: {
|
|
17
|
+
event: EventObject;
|
|
18
|
+
id: string | undefined;
|
|
19
|
+
delay: number | undefined;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ActionArgs, ActionFunction, AnyActorRef, AnyEventObject, Cast, DoNotInfer, EventFrom, EventObject, InferEvent, MachineContext, ParameterizedObject, SendExpr, SendToActionOptions } from "../types.js";
|
|
1
|
+
import { ActionArgs, ActionFunction, AnyActorRef, AnyEventObject, Cast, DoNotInfer, EventFrom, EventObject, ExecutableActionObject, InferEvent, MachineContext, ParameterizedObject, SendExpr, SendToActionOptions } from "../types.js";
|
|
2
2
|
export interface SendToAction<TContext extends MachineContext, TExpressionEvent extends EventObject, TParams extends ParameterizedObject['params'] | undefined, TEvent extends EventObject, TDelay extends string> {
|
|
3
3
|
(args: ActionArgs<TContext, TExpressionEvent, TEvent>, params: TParams): void;
|
|
4
4
|
_out_TDelay?: TDelay;
|
|
@@ -30,4 +30,13 @@ type Target<TContext extends MachineContext, TExpressionEvent extends EventObjec
|
|
|
30
30
|
* @param options Options to pass into the send action creator.
|
|
31
31
|
*/
|
|
32
32
|
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, never>;
|
|
33
|
+
export interface ExecutableSendToAction extends ExecutableActionObject {
|
|
34
|
+
type: 'xstate.sendTo';
|
|
35
|
+
params: {
|
|
36
|
+
event: EventObject;
|
|
37
|
+
id: string | undefined;
|
|
38
|
+
delay: number | undefined;
|
|
39
|
+
to: AnyActorRef;
|
|
40
|
+
};
|
|
41
|
+
}
|
|
33
42
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { symbolObservable } from "./symbolObservable.js";
|
|
2
2
|
import { AnyActorSystem, Clock } from "./system.js";
|
|
3
|
+
export declare let executingCustomAction: boolean;
|
|
3
4
|
import type { AnyActorLogic, AnyActorRef, ConditionalRequired, EmittedFrom, EventFromLogic, InputFrom, IsNotNever, Snapshot, SnapshotFrom } from "./types.js";
|
|
4
5
|
import { ActorOptions, ActorRef, InteropSubscribable, Observer, Subscription } from "./types.js";
|
|
5
6
|
export declare const $$ACTOR_TYPE = 1;
|
|
@@ -111,7 +112,7 @@ export declare class Actor<TLogic extends AnyActorLogic> implements ActorRef<Sna
|
|
|
111
112
|
*/
|
|
112
113
|
subscribe(observer: Observer<SnapshotFrom<TLogic>>): Subscription;
|
|
113
114
|
subscribe(nextListener?: (snapshot: SnapshotFrom<TLogic>) => void, errorListener?: (error: any) => void, completeListener?: () => void): Subscription;
|
|
114
|
-
on<TType extends EmittedFrom<TLogic>['type'] | '*'>(type: TType, handler: (emitted: EmittedFrom<TLogic> & (TType extends '*' ?
|
|
115
|
+
on<TType extends EmittedFrom<TLogic>['type'] | '*'>(type: TType, handler: (emitted: EmittedFrom<TLogic> & (TType extends '*' ? unknown : {
|
|
115
116
|
type: TType;
|
|
116
117
|
})) => void): Subscription;
|
|
117
118
|
/** Starts the Actor from the initial state */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AnyActorLogic, EventFromLogic, InputFrom, SnapshotFrom } from "./types.js";
|
|
2
|
+
/** @deprecated Use `initialTransition(…)` instead. */
|
|
2
3
|
export declare function getInitialSnapshot<T extends AnyActorLogic>(actorLogic: T, ...[input]: undefined extends InputFrom<T> ? [input?: InputFrom<T>] : [input: InputFrom<T>]): SnapshotFrom<T>;
|
|
3
4
|
/**
|
|
4
5
|
* Determines the next snapshot for the given `actorLogic` based on the given
|
|
@@ -7,6 +8,7 @@ export declare function getInitialSnapshot<T extends AnyActorLogic>(actorLogic:
|
|
|
7
8
|
* If the `snapshot` is `undefined`, the initial snapshot of the `actorLogic` is
|
|
8
9
|
* used.
|
|
9
10
|
*
|
|
11
|
+
* @deprecated Use `transition(…)` instead.
|
|
10
12
|
* @example
|
|
11
13
|
*
|
|
12
14
|
* ```ts
|
|
@@ -17,6 +17,7 @@ export type { ActorSystem } from "./system.js";
|
|
|
17
17
|
export { toPromise } from "./toPromise.js";
|
|
18
18
|
export * from "./types.js";
|
|
19
19
|
export { getAllOwnEventDescriptors as __unsafe_getAllOwnEventDescriptors, matchesState, pathToStateValue, toObserver } from "./utils.js";
|
|
20
|
+
export { transition, initialTransition } from "./transition.js";
|
|
20
21
|
export { waitFor } from "./waitFor.js";
|
|
21
22
|
declare global {
|
|
22
23
|
interface SymbolConstructor {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ActorRefLike,
|
|
1
|
+
import { ActorRefLike, AnyEventObject, AnyTransitionDefinition, Snapshot } from "./types.js";
|
|
2
2
|
export type InspectionEvent = InspectedSnapshotEvent | InspectedEventEvent | InspectedActorEvent | InspectedMicrostepEvent | InspectedActionEvent;
|
|
3
3
|
interface BaseInspectionEventProperties {
|
|
4
4
|
rootId: string;
|
|
@@ -26,12 +26,12 @@ export interface InspectedActionEvent extends BaseInspectionEventProperties {
|
|
|
26
26
|
type: '@xstate.action';
|
|
27
27
|
action: {
|
|
28
28
|
type: string;
|
|
29
|
-
params:
|
|
29
|
+
params: unknown;
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
32
|
export interface InspectedEventEvent extends BaseInspectionEventProperties {
|
|
33
33
|
type: '@xstate.event';
|
|
34
|
-
sourceRef:
|
|
34
|
+
sourceRef: ActorRefLike | undefined;
|
|
35
35
|
event: AnyEventObject;
|
|
36
36
|
}
|
|
37
37
|
export interface InspectedActorEvent extends BaseInspectionEventProperties {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MachineSnapshot } from "./State.js";
|
|
2
2
|
import type { StateNode } from "./StateNode.js";
|
|
3
|
-
import { AnyEventObject, AnyMachineSnapshot, AnyStateNode, AnyTransitionDefinition, DelayedTransitionDefinition, EventObject, InitialTransitionConfig, InitialTransitionDefinition, MachineContext, StateValue, TransitionDefinition, TODO, UnknownAction,
|
|
3
|
+
import { ActionArgs, AnyEventObject, AnyMachineSnapshot, AnyStateNode, AnyTransitionDefinition, DelayedTransitionDefinition, EventObject, InitialTransitionConfig, InitialTransitionDefinition, MachineContext, StateValue, TransitionDefinition, TODO, UnknownAction, ParameterizedObject, AnyTransitionConfig, AnyActorScope } from "./types.js";
|
|
4
4
|
type StateNodeIterable<TContext extends MachineContext, TE extends EventObject> = Iterable<StateNode<TContext, TE>>;
|
|
5
5
|
type AnyStateNodeIterable = StateNodeIterable<any, any>;
|
|
6
6
|
export declare function getAllStateNodes(stateNodes: Iterable<AnyStateNode>): Set<AnyStateNode>;
|
|
@@ -10,7 +10,7 @@ export declare const isStateId: (str: string) => boolean;
|
|
|
10
10
|
export declare function getCandidates<TEvent extends EventObject>(stateNode: StateNode<any, TEvent>, receivedEventType: TEvent['type']): Array<TransitionDefinition<any, TEvent>>;
|
|
11
11
|
/** All delayed transitions from the config. */
|
|
12
12
|
export declare function getDelayedTransitions(stateNode: AnyStateNode): Array<DelayedTransitionDefinition<MachineContext, EventObject>>;
|
|
13
|
-
export declare function formatTransition
|
|
13
|
+
export declare function formatTransition(stateNode: AnyStateNode, descriptor: string, transitionConfig: AnyTransitionConfig): AnyTransitionDefinition;
|
|
14
14
|
export declare function formatTransitions<TContext extends MachineContext, TEvent extends EventObject>(stateNode: AnyStateNode): Map<string, TransitionDefinition<TContext, TEvent>[]>;
|
|
15
15
|
export declare function formatInitialTransition<TContext extends MachineContext, TEvent extends EventObject>(stateNode: AnyStateNode, _target: string | undefined | InitialTransitionConfig<TContext, TEvent, TODO, TODO, TODO, TODO>): InitialTransitionDefinition<TContext, TEvent>;
|
|
16
16
|
export declare function getInitialStateNodes(stateNode: AnyStateNode): Set<AnyStateNode>;
|
|
@@ -25,13 +25,23 @@ export declare function getStateNodeByPath(stateNode: AnyStateNode, statePath: s
|
|
|
25
25
|
*
|
|
26
26
|
* @param stateValue The state value or State instance
|
|
27
27
|
*/
|
|
28
|
-
export declare function getStateNodes
|
|
28
|
+
export declare function getStateNodes(stateNode: AnyStateNode, stateValue: StateValue): Array<AnyStateNode>;
|
|
29
29
|
export declare function transitionNode<TContext extends MachineContext, TEvent extends EventObject>(stateNode: AnyStateNode, stateValue: StateValue, snapshot: MachineSnapshot<TContext, TEvent, any, any, any, any, any, any>, event: TEvent): Array<TransitionDefinition<TContext, TEvent>> | undefined;
|
|
30
30
|
/** https://www.w3.org/TR/scxml/#microstepProcedure */
|
|
31
|
-
export declare function microstep
|
|
32
|
-
export
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
export declare function microstep(transitions: Array<AnyTransitionDefinition>, currentSnapshot: AnyMachineSnapshot, actorScope: AnyActorScope, event: AnyEventObject, isInitial: boolean, internalQueue: Array<AnyEventObject>): AnyMachineSnapshot;
|
|
32
|
+
export interface BuiltinAction {
|
|
33
|
+
(): void;
|
|
34
|
+
type: `xstate.${string}`;
|
|
35
|
+
resolve: (actorScope: AnyActorScope, snapshot: AnyMachineSnapshot, actionArgs: ActionArgs<any, any, any>, actionParams: ParameterizedObject['params'] | undefined, action: unknown, extra: unknown) => [
|
|
36
|
+
newState: AnyMachineSnapshot,
|
|
37
|
+
params: unknown,
|
|
38
|
+
actions?: UnknownAction[]
|
|
39
|
+
];
|
|
40
|
+
retryResolve: (actorScope: AnyActorScope, snapshot: AnyMachineSnapshot, params: unknown) => void;
|
|
41
|
+
execute: (actorScope: AnyActorScope, params: unknown) => void;
|
|
42
|
+
}
|
|
43
|
+
export declare function resolveActionsAndContext(currentSnapshot: AnyMachineSnapshot, event: AnyEventObject, actorScope: AnyActorScope, actions: UnknownAction[], internalQueue: AnyEventObject[], deferredActorIds: string[] | undefined): AnyMachineSnapshot;
|
|
44
|
+
export declare function macrostep(snapshot: AnyMachineSnapshot, event: EventObject, actorScope: AnyActorScope, internalQueue: AnyEventObject[]): {
|
|
35
45
|
snapshot: typeof snapshot;
|
|
36
46
|
microstates: Array<typeof snapshot>;
|
|
37
47
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AnyActorLogic, EventFromLogic, InputFrom, SnapshotFrom, ExecutableActionsFrom } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Given actor `logic`, a `snapshot`, and an `event`, returns a tuple of the
|
|
4
|
+
* `nextSnapshot` and `actions` to execute.
|
|
5
|
+
*
|
|
6
|
+
* This is a pure function that does not execute `actions`.
|
|
7
|
+
*/
|
|
8
|
+
export declare function transition<T extends AnyActorLogic>(logic: T, snapshot: SnapshotFrom<T>, event: EventFromLogic<T>): [nextSnapshot: SnapshotFrom<T>, actions: ExecutableActionsFrom<T>[]];
|
|
9
|
+
/**
|
|
10
|
+
* Given actor `logic` and optional `input`, returns a tuple of the
|
|
11
|
+
* `nextSnapshot` and `actions` to execute from the initial transition (no
|
|
12
|
+
* previous state).
|
|
13
|
+
*
|
|
14
|
+
* This is a pure function that does not execute `actions`.
|
|
15
|
+
*/
|
|
16
|
+
export declare function initialTransition<T extends AnyActorLogic>(logic: T, ...[input]: undefined extends InputFrom<T> ? [input?: InputFrom<T>] : [input: InputFrom<T>]): [SnapshotFrom<T>, ExecutableActionsFrom<T>[]];
|
|
@@ -8,6 +8,8 @@ import type { Actor } from "./createActor.js";
|
|
|
8
8
|
import { Spawner } from "./spawn.js";
|
|
9
9
|
import { AnyActorSystem, Clock } from './system.js';
|
|
10
10
|
import { InspectionEvent } from "./inspection.js";
|
|
11
|
+
import { ExecutableRaiseAction } from "./actions/raise.js";
|
|
12
|
+
import { ExecutableSendToAction } from "./actions/send.js";
|
|
11
13
|
export type Identity<T> = {
|
|
12
14
|
[K in keyof T]: T[K];
|
|
13
15
|
};
|
|
@@ -42,7 +44,7 @@ export type AnyFunction = (...args: any[]) => any;
|
|
|
42
44
|
type ReturnTypeOrValue<T> = T extends AnyFunction ? ReturnType<T> : T;
|
|
43
45
|
export type IsNever<T> = [T] extends [never] ? true : false;
|
|
44
46
|
export type IsNotNever<T> = [T] extends [never] ? false : true;
|
|
45
|
-
export type Compute<A
|
|
47
|
+
export type Compute<A> = {
|
|
46
48
|
[K in keyof A]: A[K];
|
|
47
49
|
} & unknown;
|
|
48
50
|
export type Prop<T, K> = K extends keyof T ? T[K] : never;
|
|
@@ -55,13 +57,13 @@ export type IndexByProp<T extends Record<P, string>, P extends keyof T> = {
|
|
|
55
57
|
export type IndexByType<T extends {
|
|
56
58
|
type: string;
|
|
57
59
|
}> = IndexByProp<T, 'type'>;
|
|
58
|
-
export type Equals<A1
|
|
60
|
+
export type Equals<A1, A2> = (<A>() => A extends A2 ? true : false) extends <A>() => A extends A1 ? true : false ? true : false;
|
|
59
61
|
export type IsAny<T> = Equals<T, any>;
|
|
60
62
|
export type Cast<A, B> = A extends B ? A : B;
|
|
61
63
|
export type DoNotInfer<T> = [T][T extends any ? 0 : any];
|
|
62
64
|
/** @deprecated Use the built-in `NoInfer` type instead */
|
|
63
65
|
export type NoInfer<T> = DoNotInfer<T>;
|
|
64
|
-
export type LowInfer<T> = T &
|
|
66
|
+
export type LowInfer<T> = T & NonNullable<unknown>;
|
|
65
67
|
export type MetaObject = Record<string, any>;
|
|
66
68
|
export type Lazy<T> = () => T;
|
|
67
69
|
export type MaybeLazy<T> = T | Lazy<T>;
|
|
@@ -175,7 +177,7 @@ export type DelayedTransitions<TContext extends MachineContext, TEvent extends E
|
|
|
175
177
|
[K in Delay<TDelay>]?: string | SingleOrArray<TransitionConfig<TContext, TEvent, TEvent, TActor, TAction, TGuard, TDelay, TODO, // TEmitted
|
|
176
178
|
TODO>>;
|
|
177
179
|
};
|
|
178
|
-
export type StateTypes = 'atomic' | 'compound' | 'parallel' | 'final' | 'history' | string;
|
|
180
|
+
export type StateTypes = 'atomic' | 'compound' | 'parallel' | 'final' | 'history' | ({} & string);
|
|
179
181
|
export type SingleOrArray<T> = readonly T[] | T;
|
|
180
182
|
export type StateNodesConfig<TContext extends MachineContext, TEvent extends EventObject> = {
|
|
181
183
|
[K in string]: StateNode<TContext, TEvent>;
|
|
@@ -246,14 +248,14 @@ export type InvokeConfig<TContext extends MachineContext, TEvent extends EventOb
|
|
|
246
248
|
onDone?: string | SingleOrArray<TransitionConfigOrTarget<TContext, DoneActorEvent<any>, // TODO: consider replacing with `unknown`
|
|
247
249
|
TEvent, TActor, TAction, TGuard, TDelay, TEmitted, TMeta>>;
|
|
248
250
|
/**
|
|
249
|
-
* The transition to take upon the invoked child machine sending an
|
|
250
|
-
* event.
|
|
251
|
+
* The transition to take upon the invoked child machine sending an
|
|
252
|
+
* error event.
|
|
251
253
|
*/
|
|
252
254
|
onError?: string | SingleOrArray<TransitionConfigOrTarget<TContext, ErrorActorEvent, TEvent, TActor, TAction, TGuard, TDelay, TEmitted, TMeta>>;
|
|
253
255
|
onSnapshot?: string | SingleOrArray<TransitionConfigOrTarget<TContext, SnapshotEvent, TEvent, TActor, TAction, TGuard, TDelay, TEmitted, TMeta>>;
|
|
254
256
|
};
|
|
255
257
|
export type AnyInvokeConfig = InvokeConfig<any, any, any, any, any, any, any, any>;
|
|
256
|
-
export interface StateNodeConfig<TContext extends MachineContext, TEvent extends EventObject, TActor extends ProvidedActor, TAction extends ParameterizedObject, TGuard extends ParameterizedObject, TDelay extends string, TTag extends string,
|
|
258
|
+
export interface StateNodeConfig<TContext extends MachineContext, TEvent extends EventObject, TActor extends ProvidedActor, TAction extends ParameterizedObject, TGuard extends ParameterizedObject, TDelay extends string, TTag extends string, _TOutput, TEmitted extends EventObject, TMeta extends MetaObject> {
|
|
257
259
|
/** The initial state transition. */
|
|
258
260
|
initial?: InitialTransitionConfig<TContext, TEvent, TActor, TAction, TGuard, TDelay> | string | undefined;
|
|
259
261
|
/**
|
|
@@ -755,11 +757,12 @@ export interface ActorRef<TSnapshot extends Snapshot<unknown>, TEvent extends Ev
|
|
|
755
757
|
_parent?: AnyActorRef;
|
|
756
758
|
system: AnyActorSystem;
|
|
757
759
|
src: string | AnyActorLogic;
|
|
758
|
-
on: <TType extends TEmitted['type'] | '*'>(type: TType, handler: (emitted: TEmitted & (TType extends '*' ?
|
|
760
|
+
on: <TType extends TEmitted['type'] | '*'>(type: TType, handler: (emitted: TEmitted & (TType extends '*' ? unknown : {
|
|
759
761
|
type: TType;
|
|
760
762
|
})) => void) => Subscription;
|
|
761
763
|
}
|
|
762
|
-
export type AnyActorRef = ActorRef<any, any,
|
|
764
|
+
export type AnyActorRef = ActorRef<any, any, // TODO: shouldn't this be AnyEventObject?
|
|
765
|
+
any>;
|
|
763
766
|
export type ActorRefLike = Pick<AnyActorRef, 'sessionId' | 'send' | 'getSnapshot'>;
|
|
764
767
|
export type UnknownActorRef = ActorRef<Snapshot<unknown>, EventObject>;
|
|
765
768
|
export type ActorLogicFrom<T> = ReturnTypeOrValue<T> extends infer R ? R extends StateMachine<any, any, any, any, any, any, any, any, any, any, any, any, any, // TMeta
|
|
@@ -779,6 +782,7 @@ export interface ActorScope<TSnapshot extends Snapshot<unknown>, TEvent extends
|
|
|
779
782
|
emit: (event: TEmitted) => void;
|
|
780
783
|
system: TSystem;
|
|
781
784
|
stopChild: (child: AnyActorRef) => void;
|
|
785
|
+
actionExecutor: ActionExecutor;
|
|
782
786
|
}
|
|
783
787
|
export type AnyActorScope = ActorScope<any, // TSnapshot
|
|
784
788
|
any, // TEvent
|
|
@@ -815,15 +819,15 @@ in TInput = NonReducibleUnknown, TSystem extends AnyActorSystem = AnyActorSystem
|
|
|
815
819
|
/** The initial setup/configuration used to create the actor logic. */
|
|
816
820
|
config?: unknown;
|
|
817
821
|
/**
|
|
818
|
-
* Transition function that processes the current state and an incoming
|
|
819
|
-
*
|
|
822
|
+
* Transition function that processes the current state and an incoming event
|
|
823
|
+
* to produce a new state.
|
|
820
824
|
*
|
|
821
825
|
* @param snapshot - The current state.
|
|
822
|
-
* @param
|
|
826
|
+
* @param event - The incoming event.
|
|
823
827
|
* @param actorScope - The actor scope.
|
|
824
828
|
* @returns The new state.
|
|
825
829
|
*/
|
|
826
|
-
transition: (snapshot: TSnapshot,
|
|
830
|
+
transition: (snapshot: TSnapshot, event: TEvent, actorScope: ActorScope<TSnapshot, TEvent, TSystem, TEmitted>) => TSnapshot;
|
|
827
831
|
/**
|
|
828
832
|
* Called to provide the initial state of the actor.
|
|
829
833
|
*
|
|
@@ -895,7 +899,7 @@ export type ToChildren<TActor extends ProvidedActor> = string extends TActor['sr
|
|
|
895
899
|
include: {
|
|
896
900
|
[id: string]: TActor extends any ? ActorRefFromLogic<TActor['logic']> | undefined : never;
|
|
897
901
|
};
|
|
898
|
-
exclude:
|
|
902
|
+
exclude: unknown;
|
|
899
903
|
}[undefined extends TActor['id'] ? 'include' : string extends TActor['id'] ? 'include' : 'exclude']>;
|
|
900
904
|
export type StateSchema = {
|
|
901
905
|
id?: string;
|
|
@@ -960,4 +964,33 @@ export type ToStateValue<T extends StateSchema> = T extends {
|
|
|
960
964
|
[StateKey in K]: ToStateValue<T['states'][K]>;
|
|
961
965
|
};
|
|
962
966
|
}>> : never) : {};
|
|
967
|
+
export interface ExecutableActionObject {
|
|
968
|
+
type: string;
|
|
969
|
+
info: ActionArgs<MachineContext, EventObject, EventObject>;
|
|
970
|
+
params: NonReducibleUnknown;
|
|
971
|
+
exec: ((info: ActionArgs<any, any, any>, params: unknown) => void) | undefined;
|
|
972
|
+
}
|
|
973
|
+
export interface ToExecutableAction<T extends ParameterizedObject> extends ExecutableActionObject {
|
|
974
|
+
type: T['type'];
|
|
975
|
+
params: T['params'];
|
|
976
|
+
exec: undefined;
|
|
977
|
+
}
|
|
978
|
+
export interface ExecutableSpawnAction extends ExecutableActionObject {
|
|
979
|
+
type: 'xstate.spawnChild';
|
|
980
|
+
info: ActionArgs<MachineContext, EventObject, EventObject>;
|
|
981
|
+
params: {
|
|
982
|
+
id: string;
|
|
983
|
+
actorRef: AnyActorRef | undefined;
|
|
984
|
+
src: string | AnyActorLogic;
|
|
985
|
+
};
|
|
986
|
+
}
|
|
987
|
+
export type SpecialExecutableAction = ExecutableSpawnAction | ExecutableRaiseAction | ExecutableSendToAction;
|
|
988
|
+
export type ExecutableActionsFrom<T extends AnyActorLogic> = T extends StateMachine<infer _TContext, infer _TEvent, infer _TChildren, infer _TActor, infer TAction, infer _TGuard, infer _TDelay, infer _TStateValue, infer _TTag, infer _TInput, infer _TOutput, infer _TEmitted, infer _TMeta, infer _TConfig> ? SpecialExecutableAction | (string extends TAction['type'] ? never : ToExecutableAction<TAction>) : never;
|
|
989
|
+
export type ActionExecutor = (actionToExecute: ExecutableActionObject) => void;
|
|
990
|
+
export type BuiltinActionResolution = [
|
|
991
|
+
AnyMachineSnapshot,
|
|
992
|
+
NonReducibleUnknown,
|
|
993
|
+
// params
|
|
994
|
+
UnknownAction[] | undefined
|
|
995
|
+
];
|
|
963
996
|
export {};
|
|
@@ -9,7 +9,7 @@ export declare function mapValues<P, O extends Record<string, unknown>>(collecti
|
|
|
9
9
|
export declare function toArray<T>(value: readonly T[] | T | undefined): readonly T[];
|
|
10
10
|
export declare function resolveOutput<TContext extends MachineContext, TExpressionEvent extends EventObject>(mapper: Mapper<TContext, TExpressionEvent, unknown, EventObject> | NonReducibleUnknown, context: TContext, event: TExpressionEvent, self: AnyActorRef): unknown;
|
|
11
11
|
export declare function isErrorActorEvent(event: AnyEventObject): event is ErrorActorEvent;
|
|
12
|
-
export declare function toTransitionConfigArray
|
|
12
|
+
export declare function toTransitionConfigArray(configLike: SingleOrArray<AnyTransitionConfig | TransitionConfigTarget>): Array<AnyTransitionConfig>;
|
|
13
13
|
export declare function normalizeTarget<TContext extends MachineContext, TEvent extends EventObject>(target: SingleOrArray<string | StateNode<TContext, TEvent>> | undefined): ReadonlyArray<string | StateNode<TContext, TEvent>> | undefined;
|
|
14
14
|
export declare function toObserver<T>(nextHandler?: Observer<T> | ((value: T) => void), errorHandler?: (error: any) => void, completionHandler?: () => void): Observer<T>;
|
|
15
15
|
export declare function createInvokeId(stateNodeId: string, index: number): string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var guards_dist_xstateGuards = require('./raise-
|
|
3
|
+
var guards_dist_xstateGuards = require('./raise-4acdb210.development.cjs.js');
|
|
4
4
|
|
|
5
5
|
function createSpawner(actorScope, {
|
|
6
6
|
machine,
|
|
@@ -85,7 +85,7 @@ function resolveAssign(actorScope, snapshot, actionArgs, actionParams, {
|
|
|
85
85
|
...snapshot.children,
|
|
86
86
|
...spawnedChildren
|
|
87
87
|
} : snapshot.children
|
|
88
|
-
})];
|
|
88
|
+
}), undefined, undefined];
|
|
89
89
|
}
|
|
90
90
|
/**
|
|
91
91
|
* Updates the current context of the machine.
|
|
@@ -125,7 +125,7 @@ function assign(assignment) {
|
|
|
125
125
|
if (guards_dist_xstateGuards.executingCustomAction) {
|
|
126
126
|
console.warn('Custom actions should not call `assign()` directly, as it is not imperative. See https://stately.ai/docs/actions#built-in-actions for more details.');
|
|
127
127
|
}
|
|
128
|
-
function assign(
|
|
128
|
+
function assign(_args, _params) {
|
|
129
129
|
{
|
|
130
130
|
throw new Error(`This isn't supposed to be called`);
|
|
131
131
|
}
|
|
@@ -139,13 +139,10 @@ function assign(assignment) {
|
|
|
139
139
|
function resolveEmit(_, snapshot, args, actionParams, {
|
|
140
140
|
event: eventOrExpr
|
|
141
141
|
}) {
|
|
142
|
-
if (typeof eventOrExpr === 'string') {
|
|
143
|
-
throw new Error(`Only event objects may be used with emit; use emit({ type: "${eventOrExpr}" }) instead`);
|
|
144
|
-
}
|
|
145
142
|
const resolvedEvent = typeof eventOrExpr === 'function' ? eventOrExpr(args, actionParams) : eventOrExpr;
|
|
146
143
|
return [snapshot, {
|
|
147
144
|
event: resolvedEvent
|
|
148
|
-
}];
|
|
145
|
+
}, undefined];
|
|
149
146
|
}
|
|
150
147
|
function executeEmit(actorScope, {
|
|
151
148
|
event
|
|
@@ -188,12 +185,12 @@ function executeEmit(actorScope, {
|
|
|
188
185
|
* // }
|
|
189
186
|
* ```
|
|
190
187
|
*/
|
|
191
|
-
function emit(
|
|
188
|
+
function emit(/** The event to emit, or an expression that returns an event to emit. */
|
|
192
189
|
eventOrExpr) {
|
|
193
190
|
if (guards_dist_xstateGuards.executingCustomAction) {
|
|
194
191
|
console.warn('Custom actions should not call `emit()` directly, as it is not imperative. See https://stately.ai/docs/actions#built-in-actions for more details.');
|
|
195
192
|
}
|
|
196
|
-
function emit(
|
|
193
|
+
function emit(_args, _params) {
|
|
197
194
|
{
|
|
198
195
|
throw new Error(`This isn't supposed to be called`);
|
|
199
196
|
}
|
|
@@ -226,8 +223,11 @@ eventOrExpr) {
|
|
|
226
223
|
|
|
227
224
|
// @TODO: Replace with native `NoInfer` when TS issue gets fixed:
|
|
228
225
|
// https://github.com/microsoft/TypeScript/pull/57673
|
|
226
|
+
|
|
229
227
|
/** @deprecated Use the built-in `NoInfer` type instead */
|
|
228
|
+
|
|
230
229
|
/** The full definition of an event, with a string `type`. */
|
|
230
|
+
|
|
231
231
|
/**
|
|
232
232
|
* The string or object representing the state value relative to the parent
|
|
233
233
|
* state node.
|
|
@@ -237,10 +237,12 @@ eventOrExpr) {
|
|
|
237
237
|
* - For complex state nodes, this is an object, e.g., `{ success:
|
|
238
238
|
* "someChildState" }`.
|
|
239
239
|
*/
|
|
240
|
-
|
|
240
|
+
|
|
241
241
|
/** @deprecated Use `AnyMachineSnapshot` instead */
|
|
242
|
+
|
|
242
243
|
// TODO: possibly refactor this somehow, use even a simpler type, and maybe even make `machine.options` private or something
|
|
243
244
|
/** @ignore */
|
|
245
|
+
|
|
244
246
|
let SpecialTargets = /*#__PURE__*/function (SpecialTargets) {
|
|
245
247
|
SpecialTargets["Parent"] = "#_parent";
|
|
246
248
|
SpecialTargets["Internal"] = "#_internal";
|
|
@@ -266,6 +268,8 @@ let SpecialTargets = /*#__PURE__*/function (SpecialTargets) {
|
|
|
266
268
|
|
|
267
269
|
/** @deprecated */
|
|
268
270
|
|
|
271
|
+
// TODO: cover all that can be actually returned
|
|
272
|
+
|
|
269
273
|
function resolveSendTo(actorScope, snapshot, args, actionParams, {
|
|
270
274
|
to,
|
|
271
275
|
event: eventOrExpr,
|
|
@@ -274,7 +278,9 @@ function resolveSendTo(actorScope, snapshot, args, actionParams, {
|
|
|
274
278
|
}, extra) {
|
|
275
279
|
const delaysMap = snapshot.machine.implementations.delays;
|
|
276
280
|
if (typeof eventOrExpr === 'string') {
|
|
277
|
-
throw new Error(
|
|
281
|
+
throw new Error(
|
|
282
|
+
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
283
|
+
`Only event objects may be used with sendTo; use sendTo({ type: "${eventOrExpr}" }) instead`);
|
|
278
284
|
}
|
|
279
285
|
const resolvedEvent = typeof eventOrExpr === 'function' ? eventOrExpr(args, actionParams) : eventOrExpr;
|
|
280
286
|
let resolvedDelay;
|
|
@@ -287,9 +293,12 @@ function resolveSendTo(actorScope, snapshot, args, actionParams, {
|
|
|
287
293
|
const resolvedTarget = typeof to === 'function' ? to(args, actionParams) : to;
|
|
288
294
|
let targetActorRef;
|
|
289
295
|
if (typeof resolvedTarget === 'string') {
|
|
296
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
|
|
290
297
|
if (resolvedTarget === SpecialTargets.Parent) {
|
|
291
298
|
targetActorRef = actorScope.self._parent;
|
|
292
|
-
}
|
|
299
|
+
}
|
|
300
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
|
|
301
|
+
else if (resolvedTarget === SpecialTargets.Internal) {
|
|
293
302
|
targetActorRef = actorScope.self;
|
|
294
303
|
} else if (resolvedTarget.startsWith('#_')) {
|
|
295
304
|
// SCXML compatibility: https://www.w3.org/TR/scxml/#SCXMLEventProcessor
|
|
@@ -306,10 +315,11 @@ function resolveSendTo(actorScope, snapshot, args, actionParams, {
|
|
|
306
315
|
}
|
|
307
316
|
return [snapshot, {
|
|
308
317
|
to: targetActorRef,
|
|
318
|
+
targetId: typeof resolvedTarget === 'string' ? resolvedTarget : undefined,
|
|
309
319
|
event: resolvedEvent,
|
|
310
320
|
id,
|
|
311
321
|
delay: resolvedDelay
|
|
312
|
-
}];
|
|
322
|
+
}, undefined];
|
|
313
323
|
}
|
|
314
324
|
function retryResolveSendTo(_, snapshot, params) {
|
|
315
325
|
if (typeof params.to === 'string') {
|
|
@@ -349,14 +359,14 @@ function executeSendTo(actorScope, params) {
|
|
|
349
359
|
*/
|
|
350
360
|
function sendTo(to, eventOrExpr, options) {
|
|
351
361
|
if (guards_dist_xstateGuards.executingCustomAction) {
|
|
352
|
-
console.warn('Custom actions should not call `
|
|
362
|
+
console.warn('Custom actions should not call `sendTo()` directly, as it is not imperative. See https://stately.ai/docs/actions#built-in-actions for more details.');
|
|
353
363
|
}
|
|
354
|
-
function sendTo(
|
|
364
|
+
function sendTo(_args, _params) {
|
|
355
365
|
{
|
|
356
366
|
throw new Error(`This isn't supposed to be called`);
|
|
357
367
|
}
|
|
358
368
|
}
|
|
359
|
-
sendTo.type = '
|
|
369
|
+
sendTo.type = 'xstate.sendTo';
|
|
360
370
|
sendTo.to = to;
|
|
361
371
|
sendTo.event = eventOrExpr;
|
|
362
372
|
sendTo.id = options?.id;
|
|
@@ -466,7 +476,7 @@ function resolveEnqueueActions(actorScope, snapshot, args, actionParams, {
|
|
|
466
476
|
* ```
|
|
467
477
|
*/
|
|
468
478
|
function enqueueActions(collect) {
|
|
469
|
-
function enqueueActions(
|
|
479
|
+
function enqueueActions(_args, _params) {
|
|
470
480
|
{
|
|
471
481
|
throw new Error(`This isn't supposed to be called`);
|
|
472
482
|
}
|
|
@@ -484,7 +494,7 @@ function resolveLog(_, snapshot, actionArgs, actionParams, {
|
|
|
484
494
|
return [snapshot, {
|
|
485
495
|
value: typeof value === 'function' ? value(actionArgs, actionParams) : value,
|
|
486
496
|
label
|
|
487
|
-
}];
|
|
497
|
+
}, undefined];
|
|
488
498
|
}
|
|
489
499
|
function executeLog({
|
|
490
500
|
logger
|
|
@@ -514,7 +524,7 @@ function log(value = ({
|
|
|
514
524
|
context,
|
|
515
525
|
event
|
|
516
526
|
}), label) {
|
|
517
|
-
function log(
|
|
527
|
+
function log(_args, _params) {
|
|
518
528
|
{
|
|
519
529
|
throw new Error(`This isn't supposed to be called`);
|
|
520
530
|
}
|