import { Action, AnyAction } from "redux"; import { CaseReducer } from "./createReducer"; import { ActionMatcher, ActionMatcherDescriptionCollection, CaseReducers } from "./createReducer"; export interface TypedActionCreator { (...args: any[]): Action; type: Type; } /** * A builder for an action <-> reducer map. * * @public */ export interface ActionReducerMapBuilder { /** * Adds a case reducer to handle a single exact action type. * @remarks * All calls to `builder.addCase` must come before any calls to `builder.addMatcher` or `builder.addDefaultCase`. * @param actionCreator - Either a plain action type string, or an action creator generated by [`createAction`](./createAction) that can be used to determine the action type. * @param reducer - The actual case reducer function. */ addCase>(actionCreator: ActionCreator, reducer: CaseReducer>): ActionReducerMapBuilder; /** * Adds a case reducer to handle a single exact action type. * @remarks * All calls to `builder.addCase` must come before any calls to `builder.addMatcher` or `builder.addDefaultCase`. * @param actionCreator - Either a plain action type string, or an action creator generated by [`createAction`](./createAction) that can be used to determine the action type. * @param reducer - The actual case reducer function. */ addCase>(type: Type, reducer: CaseReducer): ActionReducerMapBuilder; addMatcher(matcher: ActionMatcher | ((action: AnyAction) => boolean), reducer: CaseReducer): Omit, 'addCase'>; addDefaultCase(reducer: CaseReducer): {}; } export declare function executeReducerBuilderCallback(builderCallback: (builder: ActionReducerMapBuilder) => void): [ CaseReducers, ActionMatcherDescriptionCollection, CaseReducer | undefined ]; //# sourceMappingURL=mapBuilders.d.ts.map