I'm submitting a ...
[ ] Regression (behavior that used to work and stopped working in a new release)
[ ] Bug report
[ ] Feature request
[x] Documentation issue or request
[ ] Support request
Current behavior ...
|
controlsConfig: {[key: string]: any}, |
and
|
formState: any, validatorOrOpts?: ValidatorFn|ValidatorFn[]|AbstractControlOptions|null, |
The documentation about the parameter formState in the method control(..) and the parameter controlsConfig in the method group(..) (see line reference) doesn't explain very well how to set it. Additionally, the type hints has presence of anys and makes it harder to understand.
Expected behavior
I propose the follow type hints changes to clarify the situation.
For the formState type hint:
string | { value: string, disabled: boolean }
For the controlsConfig type hint:
{ [key: string]: [string | {value: string, disabled: boolean}, ...any[]] }
I'm submitting a ...
Current behavior ...
angular/packages/forms/src/form_builder.ts
Line 57 in acf6075
and
angular/packages/forms/src/form_builder.ts
Line 105 in acf6075
The documentation about the parameter
formStatein the methodcontrol(..)and the parametercontrolsConfigin the methodgroup(..)(see line reference) doesn't explain very well how to set it. Additionally, the type hints has presence ofanys and makes it harder to understand.Expected behavior
I propose the follow type hints changes to clarify the situation.
For the
formStatetype hint:string | { value: string, disabled: boolean }For the
controlsConfigtype hint:{ [key: string]: [string | {value: string, disabled: boolean}, ...any[]] }