Union type of all possible states
ReadonlycanCheck if transition to a state is currently allowed (reactive). Takes guards into account - returns false if guard condition is not met.
ReadonlycurrentCurrent state as a Readable (read-only)
ReadonlyguardCreate a guarded callback that only runs when in specified states.
States in which the callback is allowed to run
The callback to guard
Optionaloptions: GuardOptionsConfiguration for blocked behavior
ReadonlyisCheck if currently in a specific state (reactive)
ReadonlytoTransition to a new state. Fails with InvalidTransition if the transition is not allowed from the current state, or if a guard condition is not met.
A state machine with declarative transitions.