Interface CommandHandler<State, Command, Event, Opts>
interface CommandHandler ((state,
command,
options?) => MaybePromise<undefined | Event>) Type Parameters
State
Command
Event
Opts = object
- CommandHandler(state, command, options?): MaybePromise<undefined | Event>
Parameters
state: State
command: Command
Optional
options: AbortOptions & Opts
Returns MaybePromise<undefined | Event>
Command handler function.