UNPKG

combine-action-reducer

Version:

create action creator and reducer with one action-reduer

15 lines (14 loc) 458 B
import { ObjectReducer } from "./interface"; /** * # 创建一个actionCreator from mapObj; * 设置子路径时, 使用了 '/'分割 */ export declare function buildActionCreator(mapObj: any, path?: string): any; /** * 创建一个Reducer from mapObj; */ export declare function buildReducer(mapObj: any, initState: any): any; /** * 同时创建Action Creator 和 Reducer; */ export declare function ActionReducer<S>(initState: S): ObjectReducer<S>;