File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,17 @@ export interface Action {
1717 type : any ;
1818}
1919
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+
2031
2132/* reducers */
2233
@@ -43,7 +54,7 @@ export interface Action {
4354 *
4455 * @template S State object type.
4556 */
46- export type Reducer < S > = < A extends Action > ( state : S , action : A ) => S ;
57+ export type Reducer < S > = ( state : S , action : AnyAction ) => S ;
4758
4859/**
4960 * Object whose values correspond to different reducer functions.
You can’t perform that action at this time.
0 commit comments