Closed
Description
TypeScript Version: 2.4.1
Code
import { combineReducers } from 'redux'
import { routerReducer as router } from 'react-router-redux'
const rootReducer = combineReducer<IState>({
router,
...otherReducers
})
/*
export interface Action {
type: any;
}
export interface AnyAction extends Action {
// Allows any extra properties to be defined in an action.
[extraProps: string]: any;
}
export interface RouterAction extends Action {
type: typeof CALL_HISTORY_METHOD;
payload: LocationActionPayload;
}
Error:
Type 'AnyAction' is not assignable to type 'RouterAction'.
Property 'payload' is missing in type 'AnyAction'.
*/
Expected behavior:
Maybe no error?
I'm not sure if there's any graceful solution to this problem, I mean without using 'any' type assertion.
Actual behavior:
Type 'AnyAction' is not assignable to type 'RouterAction'.
Property 'payload' is missing in type 'AnyAction'.
Metadata
Metadata
Assignees
Labels
No labels