angular - ngrx/effects 中的打字稿错误:计算的属性名称必须引用内置符号
问题描述
我正在使用 ngrx 在我的 ionic 3.9.2 应用程序中实现应用程序状态(使用本教程作为指导:https ://gonehybrid.com/a-beginners-guide-to-using-ngrx-in-an-ionic- 2-app-part-1/ )
当我尝试运行应用程序时,我目前收到此错误:
typescript: ...foo/bar/node_modules/@ngrx/effects/src/on_run_effects.d.ts, line: 9
A computed property name in a type literal must directly refer to a built-in symbol.
该错误与以下代码块有关:
export declare function isOnRunEffects(sourceInstance: {
[onRunEffectsKey]?: onRunEffectsFn;
}): sourceInstance is OnRunEffects;
我正在使用 ngrx 效果版本 6.1.0。
任何和所有的帮助都将受到赞赏,因为我对此感到非常困惑。谢谢。
编辑
我正在使用打字稿版本 3.0.1
解决方案
根据错误消息,您使用的 TypeScript 版本似乎早于 2.7。请升级到具有新规则的 2.7 或更高版本。
推荐阅读
- apache-spark - PySpark 数据帧模式动态传递
- angular - API 请求说未找到
- python - 熊猫:适用于数据框中的所有列
- node.js - AWS elastic beanstalk Amazon Linux 2 (mutlcontainer docker) 的 docker-compose 中的全栈 nodejs(前端和后端)
- c++ - 可变形物体 SFML 上的笨拙运动
- python - 如何将保存模型与真实图像一起使用?
- fastapi - pydantic :重复验证器功能
- python - 自动售货机程序帮助(python)
- javascript - 从 array.map 中获取单个项目
- flutter - 单击颤动时使照片变大