MCPcopy
hub / github.com/statelyai/xstate / initialMicrostep

Function initialMicrostep

packages/core/src/stateUtils.ts:984–1008  ·  view source on GitHub ↗
(
  root: AnyStateNode,
  preInitialState: AnyMachineSnapshot,
  actorScope: AnyActorScope,
  initEvent: AnyEventObject,
  internalQueue: AnyEventObject[]
)

Source from the content-addressed store, hash-verified

982type Microstep = readonly [AnyMachineSnapshot, ExecutableActionObject[]];
983
984export function initialMicrostep(
985 root: AnyStateNode,
986 preInitialState: AnyMachineSnapshot,
987 actorScope: AnyActorScope,
988 initEvent: AnyEventObject,
989 internalQueue: AnyEventObject[]
990): Microstep {
991 return microstep(
992 [
993 {
994 target: [...getInitialStateNodes(root)],
995 source: root,
996 reenter: true,
997 actions: [],
998 eventType: null as any,
999 toJSON: null as any
1000 }
1001 ],
1002 preInitialState,
1003 actorScope,
1004 initEvent,
1005 true,
1006 internalQueue
1007 );
1008}
1009
1010/** https://www.w3.org/TR/scxml/#microstepProcedure */
1011function microstep(

Callers 2

getInitialMicrostepsFunction · 0.90
getInitialSnapshotMethod · 0.90

Calls 2

microstepFunction · 0.85
getInitialStateNodesFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…