UNPKG

863 BTypeScriptView Raw
1import { Creator, ActionCreator, TypedAction, FunctionWithParametersType, NotAllowedCheck, ActionCreatorProps } from './models';
2export declare function createAction<T extends string>(type: T): ActionCreator<T, () => TypedAction<T>>;
3export declare function createAction<T extends string, P extends object>(type: T, config: ActionCreatorProps<P> & NotAllowedCheck<P>): ActionCreator<T, (props: P & NotAllowedCheck<P>) => P & TypedAction<T>>;
4export declare function createAction<T extends string, P extends any[], R extends object>(type: T, creator: Creator<P, R & NotAllowedCheck<R>>): FunctionWithParametersType<P, R & TypedAction<T>> & TypedAction<T>;
5export declare function props<P extends object>(): ActionCreatorProps<P>;
6export declare function union<C extends {
7 [key: string]: ActionCreator<string, Creator>;
8}>(creators: C): ReturnType<C[keyof C]>;