Function makeStateMachine
- makeStateMachine(initialState, allowedTransitionsArray): {
canTransitionTo: ((nextState: any) => any);
getStatus: ((_: any) => any);
transitionTo: ((nextState: any) => void);
} Parameters
- initialState: any
- allowedTransitionsArray: any
Returns {
canTransitionTo: ((nextState: any) => any);
getStatus: ((_: any) => any);
transitionTo: ((nextState: any) => void);
}
canTransitionTo: ((nextState: any) => any)
- (nextState): any
Returns any
getStatus: ((_: any) => any)
transitionTo: ((nextState: any) => void)
- (nextState): void
Returns void