Skip to content

Commit c483d81

Browse files
appdentimdorr
authored andcommitted
Infer action types from combineReducers (reduxjs#3411)
* Infer action types from combineReducers This change allows for `combineReducers` to completely infer both the state and action types for its returned reducer. From experience with large TypeScript projects, it's common to see that the action type is not explicitly specified, which results in `AnyAction` in the resulting reducer type. Unfortunately, this will propagate through the type inference for `createStore` resulting in `dispatch` being very weakly typed. This change alone causes a chain reaction of a more correctly (and strongly) typed project with regards to Redux. * Fix formatting issues. Former-commit-id: 2954f00 Former-commit-id: ecf7bd6
1 parent bf28cde commit c483d81

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

index.d.ts.REMOVED.git-id

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
c1a16080bf4ff5e13b371c76f9a8244038ce4578
1+
1cf5a7043373dca38569d39931f5924bb326452f
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
29376714f3f487d076240fa715ab144bee3576eb
1+
eb03eaf6d72730e3c0d5aae15a545bea180c9814

0 commit comments

Comments
 (0)