dispatchAndWaitFor()
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production.
Dispatches a command and returns a promise to wait for it to get resolved.
export declare function dispatchAndWaitFor<TCommand extends DashboardCommands, TResult>(dispatch: DashboardDispatch, command: TCommand): Promise<TResult>;
Parameters
Parameter | Type | Description |
|---|---|---|
dispatch | dashboard dispatch to use | |
command | TCommand | command to trigger and wait for resolution of |
Returns
Promise<TResult>
Promise of the command resolution