File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -176,8 +176,10 @@ export default function combineReducers<M extends UnknownReducersMapObject>(
176
176
const key = finalReducerKeys [ i ]
177
177
const reducer = finalReducers [ key ]
178
178
const previousStateForKey = state [ key ]
179
- // @ts -ignore
180
- const nextStateForKey = reducer ( previousStateForKey , action )
179
+ const nextStateForKey = reducer (
180
+ previousStateForKey as undefined ,
181
+ action as never
182
+ )
181
183
if ( typeof nextStateForKey === 'undefined' ) {
182
184
const actionType = action && action . type
183
185
throw new Error (
@@ -188,8 +190,8 @@ export default function combineReducers<M extends UnknownReducersMapObject>(
188
190
`If you want this reducer to hold no value, you can return null instead of undefined.`
189
191
)
190
192
}
191
- // @ts -ignore
192
- nextState [ key as keyof typeof nextState ] = nextStateForKey
193
+ nextState [ key as keyof typeof nextState ] =
194
+ nextStateForKey as ( typeof nextState ) [ keyof typeof nextState ]
193
195
hasChanged = hasChanged || nextStateForKey !== previousStateForKey
194
196
}
195
197
hasChanged =
You can’t perform that action at this time.
0 commit comments