File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 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>(
176176 const key = finalReducerKeys [ i ]
177177 const reducer = finalReducers [ key ]
178178 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+ )
181183 if ( typeof nextStateForKey === 'undefined' ) {
182184 const actionType = action && action . type
183185 throw new Error (
@@ -188,8 +190,8 @@ export default function combineReducers<M extends UnknownReducersMapObject>(
188190 `If you want this reducer to hold no value, you can return null instead of undefined.`
189191 )
190192 }
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 ]
193195 hasChanged = hasChanged || nextStateForKey !== previousStateForKey
194196 }
195197 hasChanged =
You can’t perform that action at this time.
0 commit comments