import { Action, ActionWithPayload } from "../action/types";
export interface Mutation {
(state: S, action: Action, key?: string | number, parent?: any): S | void;
}
export interface MutationWithPayload {
(
state: S,
action: ActionWithPayload
,
key?: string | number,
parent?: any
): S | void;
}
export type MutatorsObj = {
[propName: string]: Mutation;
};
export type MutatorsReturnObject = {
mutate: Mutation;
createState: () => S;
};