import { Reducer } from 'redux'; import { ActionCreator } from "./makeActionCreator"; import { Action } from '.'; /** * Creates a reducer that handles action creator[s] created with makeActionCreator * * @template S The type of state consumed and produced by this reducer * * @template A The type of actions the reducer can potentially respond to. * * @param {makeReducer.ActionCreators} actionCreators Can accept a single action creator, * an array of action creators or an object of action creators created with makeActionCreator * * @param {(makeReducer.ActionHandlerOrOptions | makeReducer.Options)} [actionHandlerOrOptions] * An action creator function or an optional default state * * @param {makeReducer.Options} [options] Can accept an optional default state * * @returns {Reducer} A reducer function that builds a state object. */ export declare function makeReducer( actionCreators: makeReducer.ActionCreators, actionHandlerOrOptions?: makeReducer.ActionHandler | makeReducer.Options, options?: makeReducer.Options ): Reducer; export declare namespace makeReducer { export type ActionCreators = ActionCreator | ActionCreator[] | { [name: string]: ActionCreator }; export type ActionHandler = (state:S, action:A) => any; export interface Options { defaultState: any } } export default makeReducer;