Decider
API reference for Decider
Type Alias: Decider<State, TCommand, TEvent>
Section titled “Type Alias: Decider<State, TCommand, TEvent>”Decider<
State
,TCommand
,TEvent
> =object
Decider pattern for command handling
Type Parameters
Section titled “Type Parameters”State
TCommand
Section titled “TCommand”TCommand
extends Command
TEvent
Section titled “TEvent”TEvent
extends Event
Properties
Section titled “Properties”decide()
Section titled “decide()”decide: (
command
,state
) =>TEvent
|TEvent
[]
Parameters
Section titled “Parameters”command
Section titled “command”TCommand
State
Returns
Section titled “Returns”TEvent
| TEvent
[]
evolve()
Section titled “evolve()”evolve: (
state
,event
) =>State
Parameters
Section titled “Parameters”State
ReadEvent
<TEvent
>
Returns
Section titled “Returns”State
initialState()
Section titled “initialState()”initialState: () =>
State
Returns
Section titled “Returns”State