deriveMachineTable
deriveMachineTable<
State,Event>(options):StateMachineTable<State,Event>
Defined in: packages/core/src/state-machine/index.ts:144
Derives a runtime transition table from an XState 6 machine declaration. The table is a pure value, so consumers that cannot run an Effect (stores, synchronous lifecycle objects) still share the machine’s single topology.
Only the legal from -> event -> to edges are exposed. Guards and context
assignment stay in Effect-side pure functions (see leaseTransition), which
keeps the table cheap for synchronous callers.
Type Parameters
Section titled “Type Parameters”State extends string
Event extends string
Parameters
Section titled “Parameters”options
Section titled “options”events
Section titled “events”readonly Event[]
initial
Section titled “initial”State
machine
Section titled “machine”AnyStateMachine
states
Section titled “states”readonly State[]
terminal
Section titled “terminal”readonly State[]
Returns
Section titled “Returns”StateMachineTable<State, Event>