import { Reducer } from 'react'; import { Action, Actions, GlobalStore, Modifier, Modifiers, NameSpace, Scope } from './types'; import { AsyncActionHandlers } from './useReducerAsync'; export interface ActionType> { readonly name: keyof UA; readonly action: string; readonly params: ReadonlyArray; } export interface AsyncAction> { readonly type: 'HELPER'; readonly stateModifier: ReturnType; readonly scopeName: string; readonly actionName: string; readonly params: ReadonlyArray; } declare type IAction = { readonly type: 'START_FETCH'; } | { readonly type: 'END_FETCH'; readonly scopeName: string; readonly payload: any; } | { readonly type: 'ERROR_FETCH'; }; export declare const reducer: Reducer; export declare const asyncActionHandlers: AsyncActionHandlers, AsyncAction>; export declare const createDispatcher: >(state: GS, modifiers: M, dispatch: any) => Actions; export declare const getNameSpace: , S extends Scope>(state: GS, scopeName: keyof M, scope: S, dispatch: any) => NameSpace; export declare const getAction: >(state: GS, scopeName: string, actionName: string, modifier: M, dispatch: any) => Action; export {};