updux/dist/reducer.d.ts

11 lines
579 B
TypeScript

import * as rtk from '@reduxjs/toolkit';
import { Mutation } from './types.js';
import Updux from './Updux.js';
import { AnyAction } from '@reduxjs/toolkit';
export type MutationCase = {
matcher: (action: rtk.AnyAction) => boolean;
mutation: Mutation;
terminal: boolean;
};
export declare function buildReducer(initialStateState: unknown, mutations?: MutationCase[], defaultMutation?: Omit<MutationCase, 'matcher'>, subduxes?: Record<string, Updux<any>>, inheritedReducer?: (state: any, action: AnyAction) => any): (state: unknown, action: rtk.AnyAction) => unknown;