commandStartedEventHandler()
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production. See API maturity.
Creates a DashboardEventHandler instance that will be invoked for a DashboardCommandStarted of a particular command.
export declare function commandStartedEventHandler<TCommand extends IDashboardCommand>(type: TCommand["type"], handler: DashboardEventHandler<IDashboardCommandStarted<TCommand>>["handler"]): DashboardEventHandler<IDashboardCommandStarted<TCommand>>;
Parameters
Parameter | Type | Description |
|---|---|---|
type | TCommand[“type”] | the type of command the DashboardCommandStarted of which this handler should trigger for |
handler | DashboardEventHandler<IDashboardCommandStarted<TCommand>>[“handler”] | the actual event handling function |
Returns
DashboardEventHandler<IDashboardCommandStarted<TCommand>>