I'm trying to figure out how to use react-intl-redux with TypeScript.
I've tried this:
import { combineReducers, AnyAction } from "redux";
import { intlReducer, IntlState } from "react-intl-redux";
export type AppState = {
intl: IntlState;
};
export type AppAction = AnyAction;
export default combineReducers<AppState>({
intl: intlReducer
});
But I've got a warning:
Argument of type '{ intl: (state: IntlState, action: IntlAction) => IntlState; }' is not assignable to parameter of type 'ReducersMapObject<AppState, AnyAction>'.
Types of property 'intl' are incompatible.
Type '(state: IntlState, action: IntlAction) => IntlState' is not assignable to type 'Reducer<IntlState, AnyAction>'.
Types of parameters 'state' and 'state' are incompatible.
Type 'IntlState | undefined' is not assignable to type 'IntlState'.
Type 'undefined' is not assignable to type 'IntlState'.
(alias) function intlReducer(state: IntlState, action: IntlAction): IntlState
import intlReducer
Could you please help me out about this?
I'm trying to figure out how to use
react-intl-reduxwith TypeScript.I've tried this:
But I've got a warning:
Could you please help me out about this?