commandStartedEventHandler()
Home > @gooddata/sdk-ui-dashboard > commandStartedEventHandler
commandStartedEventHandler() function
This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Creates a DashboardEventHandler instance that will be invoked for a DashboardCommandStarted of a particular command.
Signature:
export declare function commandStartedEventHandler<TCommand extends IDashboardCommand>(type: TCommand["type"], handler: DashboardEventHandler<DashboardCommandStarted<TCommand>>["handler"]): DashboardEventHandler<DashboardCommandStarted<TCommand>>;
Parameters
| Parameter | Type | Description | 
|---|---|---|
| type | TCommand["type"] | the type of command the DashboardCommandStarted of which this handler should trigger for | 
| handler | DashboardEventHandler<DashboardCommandStarted<TCommand>>["handler"] | the actual event handling function | 
Returns:
DashboardEventHandler<DashboardCommandStarted<TCommand>>