StateF | baconjs (original) (raw)
State machine function used in withStateMachine.
Type parameters
In
State
Out
Hierarchy
- StateF
Callable
- __call(state: State, event: Event<In>): [State, Event<Out>[]]
- State machine function used in withStateMachine.
typeparam
type of machine state
typeparam
type of values to be emitted
typeparam
type of values in the input events
Parameters
state: State
current state of the state machine.
Event<In>
event:
input event to react on
Returns [State, Event<Out>[]]
a tuple containing the next state and an array of events to be emitted.