2020-04-13 08:24:13 +00:00
|
|
|
import { ReduxAction, ReduxActionTypes } from "constants/ReduxActionConstants";
|
|
|
|
|
|
|
|
|
|
export const batchAction = (action: ReduxAction<any>) => ({
|
|
|
|
|
type: ReduxActionTypes.BATCHED_UPDATE,
|
|
|
|
|
payload: action,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
export type BatchAction<T> = ReduxAction<ReduxAction<T>>;
|
2020-10-21 04:25:32 +00:00
|
|
|
|
|
|
|
|
export const batchActionSuccess = (actions: ReduxAction<any>[]) => ({
|
|
|
|
|
type: ReduxActionTypes.BATCH_UPDATES_SUCCESS,
|
|
|
|
|
payload: actions,
|
|
|
|
|
});
|