(name: K, control: TControl[K])
| 246 | ): AbstractControl<any>; |
| 247 | |
| 248 | registerControl<K extends string & keyof TControl>(name: K, control: TControl[K]): TControl[K] { |
| 249 | const existingControl = this._find(name as string); |
| 250 | if (existingControl) return existingControl as TControl[K]; |
| 251 | this.controls[name] = control; |
| 252 | control.setParent(this as FormGroup); |
| 253 | control._registerOnCollectionChange(this._onCollectionChange); |
| 254 | return control; |
| 255 | } |
| 256 | |
| 257 | /** |
| 258 | * Add a control to this group. In a strongly-typed group, the control must be in the group's type |
no test coverage detected