import { PayloadAction } from '../action'; export type TrrackActionFunction = (args: DoActionPayload) => { do?: PayloadAction; undo: PayloadAction; }; export type ProduceWrappedStateChangeFunction = (state: T, args: any) => T; export type StateChangeFunction = (state: State, payload: Payload) => void | ReturnType>; export type Label = string; export type LabelGenerator = (args: Args) => Label; export type TrrackActionConfig = { hasSideEffects: boolean; eventType: Event; label: LabelGenerator; }; export type TrrackActionRecord = { do: PayloadAction; undo: PayloadAction; };