简体   繁体   English

“formDirective”在“ControlContainer”类中定义为访问器,但在“ConnectArrayDirective”中作为实例属性在这里被覆盖

[英]'formDirective' is defined as an accessor in class 'ControlContainer', but is overridden here in 'ConnectArrayDirective' as an instance property

After updating angular 9 to the latest version ("@angular/core": "~11.0.0-next.0",).将 angular 9 更新到最新版本后 ("@angular/core": "~11.0.0-next.0",)。 I got the below error, however, I have updated the latest version of @angular-redux/form, @angular-redux/router and @angular-redux/store我收到以下错误,但是,我已经更新了@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 update角度更新

"@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错误

 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[];

These libraries are maintained no more, check this repo这些库不再维护,检查这个 repo

as a workaround while upgrading the project I set "skipLibCheck": true, in tsconfig.json inside compilerOptions like below:作为升级项目时的解决方法,我在compilerOptions内的 tsconfig.json 中设置了“skipLibCheck”:true,如下所示:

{
  ...,
  "compilerOptions": {
    ...,
    ...,
    "skipLibCheck": true,
    ...,
    ...
  },
  "angularCompilerOptions": {
    ...
  }
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 TS2611:“foo”被定义为“A”类中的属性,但在“B”中作为访问器被覆盖 - TS2611: 'foo' is defined as a property in class 'A', but is overridden here in 'B' as an accessor 'disabled' 在 class 'CanColor & CanDisableRipple & HasTabIndex & MatChipBase' 中被定义为属性,但在 'MatChip' 中被覆盖为访问权限 - 'disabled' is defined as a property in class 'CanColor & CanDisableRipple & HasTabIndex & MatChipBase', but is overridden here in 'MatChip' as an acce 使用 ControlContainer 创建可重用的 matInput 组件时,“没有名称的表单控件的值访问器” - 'No value accessor for form control with name' while creating reusable matInput component with ControlContainer 将属性添加到类实例 - Add property to a class instance Typescript-请在这里如何创建类实例? - Typescript - How the class instance is created here please? 没有ControlContainer的提供者和ControlContainer的提供者 - No provider for ControlContainer and No provider for ControlContainer 泛型类中数组属性的实例? - Instance of array property in generic class? 角度2:使用[class.someClass]会导致`ControlContainer没有提供者!? - Angular 2 : using [class.someClass] causes `No provider for ControlContainer!`? Angular2 Linq样式属性访问器 - Angular2 linq style property accessor 为什么我在Typescript定义的类上的属性显示为未定义? - Why is a property on my Typescript-defined class showing up as undefined?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM