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 = { [P in keyof TMutatorsObj]: ReturnType; }; export type MutatorInterface = { mutate: Mutation; createState: () => S; };