StateMachine
-
class
wv.Util.StateMachine() StateMachine<State, ActionNames> is a minimalist state machine
Constructors
-
wv.Util.StateMachine.constructor() - StateMachine(state: State, reducer:
StateReducer<State, ActionNames>):StateMachine<State, ActionNames>Parameters
state: State
reducer:
StateReducer<State, ActionNames>Returns:
StateMachine<State, ActionNames>
Methods
-
wv.Util.StateMachine.handle() - handle(evt: ActionNames, payload: any): void
Handle an action and update the state
Parameters
evt: ActionNames
The action to handlepayload: any
The payload if anyReturns: void