dispatchAndWaitFor()
Home > @gooddata/sdk-ui-dashboard > dispatchAndWaitFor
dispatchAndWaitFor() 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.
Dispatches a command and returns a promise to wait for it to get resolved.
Signature:
export declare function dispatchAndWaitFor<TCommand extends DashboardCommands, TResult>(dispatch: DashboardDispatch, command: TCommand): Promise<TResult>;
Parameters
Parameter | Type | Description |
---|---|---|
dispatch | DashboardDispatch | dashboard dispatch to use |
command | TCommand | command to trigger and wait for resolution of |
Returns:
Promise<TResult>
Promise of the command resolution