我正在将我的 root reducer 从 javascript 转换为 typescript,但是,我收到一个 linting 错误说:
缺少函数的返回类型。(@typescript-eslint/explicit-function-return-type)
我的根 reducer 函数的正确返回类型应该是什么?谢谢。
import { History } from 'history';
import { combineReducers } from 'redux';
import { connectRouter } from 'connected-react-router';
import sampleReducer from './sampleReducer';
export default (historyObject: History) => combineReducers({
sampleReducer,
router: connectRouter(historyObject),
});