1 | import { ActionCreatorTypeMetadata } from './type-helpers';
|
2 | export declare type ActionCreator<T extends {
|
3 | type: string;
|
4 | }> = ((...args: any[]) => T) & ActionCreatorTypeMetadata<T['type']>;
|
5 | /**
|
6 | * @description (curried assert function) check if an action is the instance of given action-creator(s)
|
7 | * @description it works with discriminated union types
|
8 | */
|
9 | export declare function isActionOf<AC extends ActionCreator<{
|
10 | type: string;
|
11 | }>>(actionCreator: AC | AC[], action: {
|
12 | type: string;
|
13 | }): action is ReturnType<AC>;
|
14 | /**
|
15 | * @description (curried assert function) check if an action is the instance of given action-creator(s)
|
16 | * @description it works with discriminated union types
|
17 | */
|
18 | export declare function isActionOf<AC extends ActionCreator<{
|
19 | type: string;
|
20 | }>>(actionCreator: AC | AC[]): (action: {
|
21 | type: string;
|
22 | }) => action is ReturnType<AC>;
|