(
controls: {[key: string]: any},
options: AbstractControlOptions | {[key: string]: any} | null = null,
)
| 270 | group(controls: {[key: string]: any}, options: {[key: string]: any}): FormGroup; |
| 271 | |
| 272 | group( |
| 273 | controls: {[key: string]: any}, |
| 274 | options: AbstractControlOptions | {[key: string]: any} | null = null, |
| 275 | ): FormGroup { |
| 276 | const reducedControls = this._reduceControls(controls); |
| 277 | let newOptions: FormControlOptions = {}; |
| 278 | if (isAbstractControlOptions(options)) { |
| 279 | // `options` are `AbstractControlOptions` |
| 280 | newOptions = options; |
| 281 | } else if (options !== null) { |
| 282 | // `options` are legacy form group options |
| 283 | newOptions.validators = (options as any).validator; |
| 284 | newOptions.asyncValidators = (options as any).asyncValidator; |
| 285 | } |
| 286 | return new FormGroup(reducedControls, newOptions); |
| 287 | } |
| 288 | |
| 289 | /** |
| 290 | * @description |
no test coverage detected