import { ActionFunctions, Reducer, ReducerMap } from 'redux-actions';
/**
* @type S - State that all reducer functions (combined with this class) should use.
* @type Payload - Payload for actions - type will be updated based on added reducer function action types on returned object type
*/
export declare class ReducerFactory {
private state;
private reducerMap;
constructor(state: S);
/**
* When using this method overload, reducers state parameter and return type are inferred.
* See other overloads that also infer action payload type (or provide it for this method manually as generic type parameter).
* @type P - action payload type (`void` by default that effectively prevents using reducer action payload unless payload type is mentioned with generic parameter type)
*/
addReducer
(actionType: string, reducer: Reducer): ReducerFactory;
/**
* When using this method overload, then reducer action type is also inferred
* (in addition to reducer state type for state parameter and return type).
* @type P - action payload type
*/
addReducer
(actionCreator: ActionFunctions
, reducer: Reducer): ReducerFactory;
/**
* Usually it is easier and safer to use `addReducer(...)` methods instead of this method,
* but sometimes it can become useful - for example when You can generate reducers for some actions automatically
* (for example table paging/sorting/filtering related reducers)
*/
addReducers
(anotherReducerMap: ReducerMap): ReducerFactory;
private addReducerInternal
(actionTypeOrActionCreator, reducer); /** * Simply returns `this` * (but return type is improved, so that `P` is included in allowed `Payload` type) */ protected asAllowingPayload
(): ReducerFactory;
/**
* creates Redux reducer that can be used to create Redux store
*/
toReducer(): Reducer;
}