Skip to content

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.

State extends string

Event extends string

readonly Event[]

State

AnyStateMachine

readonly State[]

readonly State[]

StateMachineTable<State, Event>