import { SortInfo } from './types'; export interface Action { type: string; payload?: any; } export interface State { isError: boolean; isLoading: boolean; items: T[]; searchParams?: { [x: string]: string; }; sorts?: SortInfo[]; } export interface Reducer { (state: State, action: Action): State; } /** * 获取数据的reducer * * @param state 状态 * @param action 动作 */ declare function reducer(state: State, action: Action): State; export default reducer;