UNPKG

783 BTypeScriptView Raw
1import { Reducer } from 'redux';
2import { FluxStandardAction, LeafStandardAction, LeafCompoundAction } from './types/action.type';
3import LeafReducer from './types/reducer.type';
4import { Actions } from './types/actions.type';
5declare type Action = FluxStandardAction | LeafStandardAction | LeafCompoundAction;
6/**
7 *
8 * @param initialState - Initial state of the reducer
9 * @param reducersDict - Object of leaf reducer definitions keyed by creatorKeys
10 *
11 * @template TS - TreeShape
12 * @template RD - Dictionary of LeafReducer.Definition
13 */
14declare function reduxLeaves<TS extends object = any, RD extends LeafReducer.Definitions = {}>(initialState: TS, reducersDict?: RD): [Reducer<TS, Action>, Actions.Branch<TS, TS, TS, RD>];
15export { reduxLeaves };
16export default reduxLeaves;