@ue-too/being / index / extractMachineGraph
関数: extractMachineGraph()
extractMachineGraph(
machine):MachineGraph
定義: introspect.ts:60
Extracts a machine's states and transitions as a directed graph.
パラメータ
machine
StateMachine<any, any, any, any>
戻り値
Remarks
Reads only the machine's public surface (possibleStates, each state's eventReactions, eventGuards, and eventPreconditions) — the machine's behavior is untouched. Per state and event, emits one edge to the reaction's defaultTargetState (or a self-loop when it has none), plus one guard-labeled edge per eventGuards mapping; every edge carries the event's declared preconditions, if any.