You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That is not correct as every action runs through every reducer (if I understand ngrx correctly that is still the case). TypeScript with --strictFunctionTypes errors when you write you your reducers with any type different from reducer(state = defaultState, action: Action).
Minimal reproduction of the bug/regression with instructions:
The definition of routerReducer is written to accept a subtype of Action.
https://github.com/ngrx/platform/blob/master/modules/router-store/src/reducer.ts#L23
That is not correct as every action runs through every reducer (if I understand ngrx correctly that is still the case). TypeScript with --strictFunctionTypes errors when you write you your reducers with any type different from
reducer(state = defaultState, action: Action)
.Expected behavior:
Router reducer should be written as:
The unsafe (but benign) type cast should live inside the reducer function.
Other information:
General issue about --strictFunctionTypes - #951.
I would be willing to submit a PR to fix this issue
[x] Yes (Assistance is provided if you need help submitting a pull request)
[ ] No
The text was updated successfully, but these errors were encountered: