-
-
Couldn't load subscription status.
- Fork 15.2k
Closed
Description
What is the current behavior?
Redux set never as type instead of unknown:
The types of 'router.location.state' are incompatible between these types.
Type 'unknown' is not assignable to type 'never'.
Steps to Reproduce
import { connectRouter, LocationChangeAction, RouterState } from 'connected-react-router';
import { History } from 'history';
import { applyMiddleware, combineReducers, compose, createStore, Store, CombinedState, AnyAction } from 'redux';
export type ApplicationState = { router: RouterState };
const createRootReducer = (history: History) => combineReducers({
router: connectRouter(history),
});
export default function configureStore(history: History, initialState?: ApplicationState): Store<CombinedState<any>, AnyAction | LocationChangeAction<any>> {
const store = createStore(
createRootReducer(history), // root reducer with router state
initialState,
);
return store;
}What is the expected behavior?
Use unknown instead of never
Environment Details
Redux 4.1.0
Chrome
Windows 10
Did this work in previous versions of Redux? Yes
jpage-godaddy and dKab
Metadata
Metadata
Assignees
Labels
No labels