import { ActionCreator } from './createAction';

type ActionFn<T = unknown, K = unknown> = (state: T, { payload }: {
    payload: K;
}) => T;
interface Builder<T> {
    addCase<P extends ActionCreator<any>>(actionCreator: P, actionFn: ActionFn<T, Parameters<P>[0]>): void;
}
export declare function createReducer<T>(initStates: T, callback: (builder: Builder<T>) => void): {
    getInitialState(): T;
    getReducer(): Record<string, ActionFn<T, unknown>>;
};
export {};
