首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用@角- Redux /存储时使用redux 4.0.0时出错

使用@角- Redux /存储时使用redux 4.0.0时出错
EN

Stack Overflow用户
提问于 2018-05-02 06:59:10
回答 1查看 849关注 0票数 1

在编译时获取以下错误:

代码语言:javascript
复制
ERROR in node_modules/@angular-redux/store/lib/src/components/ng-redux.d.ts(10,31): error TS2420: Class 'NgRedux<RootState>' incorrectly implements interface 'ObservableStore<RootState>'.
  Types of property 'dispatch' are incompatible.
    Type 'Dispatch<RootState>' is not assignable to type 'Dispatch<AnyAction>'.
      Type 'RootState' is not assignable to type 'AnyAction'.
node_modules/@angular-redux/store/lib/src/components/ng-redux.d.ts(37,33): error TS2344: Type 'RootState' does not satisfy the constraint 'Action<any>'.
node_modules/@angular-redux/store/lib/src/components/root-store.d.ts(18,24): error TS2344: Type 'RootState' does not satisfy the constraint 'Action<any>'.

环境设置:

NodeJS版本: 8.9.1

打字本版本: 2.8.1

角版: 5.0.0

@角-redux/存储版本: 7.1.1

操作系统: Windows 10

EN

回答 1

Stack Overflow用户

发布于 2018-05-08 09:49:28

@ and /store github页面确认这是一个bug,并将在以后的版本中进行修复。

将Redux版本从4.0.0降到3.7.0,解决了这个问题。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50128797

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档