File tree 1 file changed +12
-1
lines changed
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,17 @@ export interface Action {
17
17
type : any ;
18
18
}
19
19
20
+ /**
21
+ * An Action type which accepts any other properties.
22
+ * This is mainly for the use of the `Reducer` type.
23
+ * This is not part of `Action` itself to prevent users who are extending `Action.
24
+ * @private
25
+ */
26
+ export interface AnyAction extends Action {
27
+ // Allows any extra properties to be defined in an action.
28
+ [ extraProps : string ] : any ;
29
+ }
30
+
20
31
21
32
/* reducers */
22
33
@@ -43,7 +54,7 @@ export interface Action {
43
54
*
44
55
* @template S State object type.
45
56
*/
46
- export type Reducer < S > = < A extends Action > ( state : S , action : A ) => S ;
57
+ export type Reducer < S > = ( state : S , action : AnyAction ) => S ;
47
58
48
59
/**
49
60
* Object whose values correspond to different reducer functions.
You can’t perform that action at this time.
0 commit comments