FormControl 类型 angular 打字稿
FormControl type angular typescript
我有这样的东西
get formControls(): any {
return this.form.controls;
}
但是现在 tslint
我遇到了问题。它 return 是错误
'any' 的类型声明失去了类型安全性。考虑用更精确的类型替换它。
有人知道 this.form.controls
return 是什么类型吗?我试过 FormGroup
、FormControl
,但 none 是正确的。
get formControls(): { [key: string]: AbstractControl } {
return this.form.controls;
}
A collection of child controls. The key for each child is the name
under which it is registered.
我有这样的东西
get formControls(): any {
return this.form.controls;
}
但是现在 tslint
我遇到了问题。它 return 是错误
'any' 的类型声明失去了类型安全性。考虑用更精确的类型替换它。
有人知道 this.form.controls
return 是什么类型吗?我试过 FormGroup
、FormControl
,但 none 是正确的。
get formControls(): { [key: string]: AbstractControl } {
return this.form.controls;
}
A collection of child controls. The key for each child is the name under which it is registered.