StateMachineConfig
The config object used to instantiate a new FSM instance.
transitions
Transitions<T>Defines the available states of the state machine as well as the permitted transitions from one state to another.
onTransitionStart
OnTransitionStartFn<T, Data>Called before a transition takes place. If the function resolves to false or a string, then the transition
will be cancelled. In the case of a string, the string (error message) will be forwarded to the onError handler.
If this function returns a value resolving to true or void (no return value), then the transition
will be permitted.
onTransitionEnd
OnTransitionEndFn<T, Data>Called after a transition has taken place.
onError
OnTransitionErrorFn<T>Called when a transition is prevented and the onTransitionStart handler has returned an
error message.
Called before a transition takes place. If the function resolves to false or a string, then the transition
will be cancelled. In the case of a string, the string (error message) will be forwarded to the onError handler.
If this function returns a value resolving to true or void (no return value), then the transition
will be permitted.
Called when a transition is prevented and the onTransitionStart handler has returned an
error message.
Called after a transition has taken place.