Declares fallback handling for one or more events.
Fallback rules are considered only when the current state has no matching transition for the event.
The body receives an FsmEventBuilder, the same DSL used by state event handlers.
Sets the initial state explicitly.
If not called, the first declared state becomes the initial state.
Sets a human-readable name for the machine.
Used in trace output. If not set, the engine uses its default name.
Declares a state.
The body receives a FsmStateBuilder for defining entry and exit actions and event handling for the state.
Optionalbody: (b: FsmStateBuilder<State, Events, Context>) => void
Top-level builder passed to FsmEngine.define.
Used to declare the machine's name, initial state, states, and fallback event handling.