如何解决“ formDirective”在类“ ControlContainer”中定义为访问器,但此处在“ ConnectArrayDirective”中作为实例属性覆盖
将angular 9更新到最新版本(“ @ angular / core”:“〜11.0.0-next.0”,)之后。我遇到以下错误,但是,我更新了@angular-redux/form,@angular-redux/router and @angular-redux/store
"@angular-redux/form": "^10.0.0","@angular-redux/router": "^10.0.0","@angular-redux/store": "^10.0.0",
角度更新
"@angular/common": "~11.0.0-next.0","@angular/compiler": "~11.0.0-next.0","@angular/core": "~11.0.0-next.0","@angular/forms": "~11.0.0-next.0",
错误
ERROR in node_modules/@angular-redux/form/connect-array/connect-array.directive.d.ts:22:14 - error TS2610: 'formDirective' is defined as an accessor in class 'ControlContainer',but is overridden here in 'ConnectArrayDirective' as an instance property.
22 readonly formDirective: FormGroupDirective;
~~~~~~~~~~~~~
node_modules/@angular-redux/form/connect-array/connect-array.directive.d.ts:23:14 - error TS2610: 'path' is defined as an accessor in class 'ControlContainer',but is overridden here in 'ConnectArrayDirective' as an instance property.
23 readonly path: string[];
解决方法
不再维护这些库,请检查 this repo
作为升级项目时的一种解决方法,我在 tsconfig.json 中的 compilerOptions 中设置了“skipLibCheck”:true,如下所示:
{
...,"compilerOptions": {
...,...,"skipLibCheck": true,...
},"angularCompilerOptions": {
...
}
}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。