Reactjs 联合收割机时出现类型错误";“对重复性反应”;反应项目

Reactjs 联合收割机时出现类型错误";“对重复性反应”;反应项目,reactjs,react-redux,toast,Reactjs,React Redux,Toast,我想补充一点 当我试图结合减少我得到以下错误 No overload matches this call. Overload 1 of 2, '(reducers: ReducersMapObject<{ basketsReducer: Reducer<any, AnyAction>; toasts: Toast[]; }, any>): Reducer<{ basketsReducer: Reducer<any, AnyAction>;

我想补充一点

当我试图结合减少我得到以下错误

    No overload matches this call.
  Overload 1 of 2, '(reducers: ReducersMapObject<{ basketsReducer: Reducer<any, AnyAction>; toasts: Toast[]; }, any>): Reducer<{ basketsReducer: Reducer<any, AnyAction>; toasts: Toast[]; }, AnyAction>', gave the following error.
    Type '(toastList: Toast[], action: ToastAction<any>) => Toast[]' is not assignable to type 'Reducer<Toast[], any>'.
      Types of parameters 'toastList' and 'state' are incompatible.
        Type 'Toast[] | undefined' is not assignable to type 'Toast[]'.
          Type 'undefined' is not assignable to type 'Toast[]'.
  Overload 2 of 2, '(reducers: ReducersMapObject<{ basketsReducer: Reducer<any, AnyAction>; toasts: Toast[]; }, AnyAction>): Reducer<{ basketsReducer: Reducer<...>; toasts: Toast[]; }, AnyAction>', gave the following error.
    Type '(toastList: Toast[], action: ToastAction<any>) => Toast[]' is not assignable to type 'Reducer<Toast[], AnyAction>'.
      Types of parameters 'toastList' and 'state' are incompatible.
        Type 'Toast[] | undefined' is not assignable to type 'Toast[]'.
          Type 'undefined' is not assignable to type 'Toast[]'.ts(2769)
index.ts(7, 18): The expected type comes from property 'toasts' which is declared here on type 'ReducersMapObject<{ basketsReducer: Reducer<any, AnyAction>; toasts: Toast[]; }, any>'
index.ts(7, 18): The expected type comes from property 'toasts' which is declared here on type 'ReducersMapObject<{ basketsReducer: Reducer<any, AnyAction>; toasts: Toast[]; }, AnyAction>'

烤面包可能不是合适的减速机。需要更多代码来帮助。我正在使用library和Follow Documentation,因为toast项目已经有2年了,而且最近没有其他人在github上抱怨过这个错误,或者没有其他人使用该项目,或者您的部分内容不正确。我倾向于你的代码出现错误的可能性更高,因此请发布更多代码。实际上,除了安装“react-toastify redux”并将其添加到我现有的combine reducer中之外,我没有做太多工作,我正在项目中使用类型脚本,如果我删除了“basketReducer”错误仍然存在在codesandbox上设置它。应该很简单,因为你已经设置了很多。
import { toastsReducer as toasts } from 'react-toastify-redux';
import basketsReducer from './basketsReducer';

 export default combineReducers({
    basketsReducer,toasts
 })