1 | import { ActorRefLike, AnyEventObject, AnyTransitionDefinition, Snapshot } from "./types.js";
|
2 | export type InspectionEvent = InspectedSnapshotEvent | InspectedEventEvent | InspectedActorEvent | InspectedMicrostepEvent | InspectedActionEvent;
|
3 | interface BaseInspectionEventProperties {
|
4 | rootId: string;
|
5 | |
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 | actorRef: ActorRefLike;
|
13 | }
|
14 | export interface InspectedSnapshotEvent extends BaseInspectionEventProperties {
|
15 | type: '@xstate.snapshot';
|
16 | event: AnyEventObject;
|
17 | snapshot: Snapshot<unknown>;
|
18 | }
|
19 | interface InspectedMicrostepEvent extends BaseInspectionEventProperties {
|
20 | type: '@xstate.microstep';
|
21 | event: AnyEventObject;
|
22 | snapshot: Snapshot<unknown>;
|
23 | _transitions: AnyTransitionDefinition[];
|
24 | }
|
25 | export interface InspectedActionEvent extends BaseInspectionEventProperties {
|
26 | type: '@xstate.action';
|
27 | action: {
|
28 | type: string;
|
29 | params: unknown;
|
30 | };
|
31 | }
|
32 | export interface InspectedEventEvent extends BaseInspectionEventProperties {
|
33 | type: '@xstate.event';
|
34 | sourceRef: ActorRefLike | undefined;
|
35 | event: AnyEventObject;
|
36 | }
|
37 | export interface InspectedActorEvent extends BaseInspectionEventProperties {
|
38 | type: '@xstate.actor';
|
39 | }
|
40 | export {};
|