fix(forms): allow FormBuilder to create controls with any formState type (#20917)

Align formState type in FormBuilder#control with FormControl#constructor

Fixes #20368

PR Close #20917
This commit is contained in:
Oussama Ben Brahim
2017-12-09 19:17:49 +01:00
committed by Misko Hevery
parent 5713faa667
commit 170885c51b
3 changed files with 36 additions and 5 deletions

View File

@ -211,7 +211,7 @@ export declare class FormArrayName extends ControlContainer implements OnInit, O
/** @stable */
export declare class FormBuilder {
array(controlsConfig: any[], validator?: ValidatorFn | null, asyncValidator?: AsyncValidatorFn | null): FormArray;
control(formState: Object, validator?: ValidatorFn | ValidatorFn[] | null, asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null): FormControl;
control(formState: any, validator?: ValidatorFn | ValidatorFn[] | null, asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null): FormControl;
group(controlsConfig: {
[key: string]: any;
}, extra?: {