I'm implementing redux-dynamic-modules in my application and it is not the first module in my app, but I get strange error when I try to create this module:
export const reduxProfile = () => {
return {
id: 'profile',
reducerMap: {
profile: reducer
},
sagas: [profileSagas],
retained: true
}
}
Type 'Reducer<ProfileState, Action>' is not assignable to type 'Reducer<any, AnyAction>'. Types of parameters 'action' and 'action' are incompatible. Type 'AnyAction' is not assignable to type 'Action'. Type 'AnyAction' is not assignable to type 'SetPriceAction'.
And here's my SetPriceAction which seems to look just fine:
export interface SetPriceAction extends AnyAction {
payload: Result;
type: ActionTypes.SET_PRICE;
}
...
export type Action =
| ...
| SetPriceAction;
In another module is pretty much of the same shape, and everything works fine there. Can anybody help what went wrong here?