出现以下错误: Type '{ store: Store<CombinedState<{ user: User; }>, AnyAction>; }' is not assignable to type类型‘IntrinsicAttributes’上不存在属性'store‘。(2322) 使用我的reacttypescript应用。不知道这里错过了什么。有谁能帮帮我吗? Live Demo
目前,在reducer中,作为action的类型,我正在使用any。由于使用any是一种糟糕的做法,我应该如何替换它呢?我试图通过导入Action类型来使用import { Action } from "redux";类型,但随后我获得了Property 'homePageMovies' does not exist ontype 'Action<any>'.错误,对于其他操作类型,它与此等效。
我正处于一个大型redux状态的重构过程中,我的问题是尚未转换为typescript的reducers返回unknown,而我更希望它返回any。有什么方法可以更改ReturnType的默认回退import { connectRouter } from 'connected-react-router.. });
export type
我试图设置两个连接-反应路由器和RTK查询的简化器。然后我收到了这个错误。Type 'Reducer<RouterState<unknown>, AnyAction>' is not assignable to type 'Reducer<unknown, AnyAction我的"mockApi“很简单。"orderApi“在某种程度上是一样的。combineReduc
/node_modules/@reduxjs/toolkit/dist/configureStore.d.ts(1,13):'=‘=’预期中的TypeScript错误。TS1005
1从‘redux’导入类型{ Reducer、ReducersMapObject、中间件、动作、AnyAction、StoreEnhancer、Store、Dispatch、PreloadedState/getDefault中间件’导入4种导入类型{ Di