-
Notifications
You must be signed in to change notification settings - Fork 27.1k
Open
Labels
P4A relatively minor issue that is not relevant to core functionsA relatively minor issue that is not relevant to core functionsarea: formscross-cutting: typesfreq1: lowstate: confirmedtype: bug/fix
Milestone
Description
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
angular/packages/forms/src/form_builder.ts
Line 105 in acf6075
| 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[]] }
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P4A relatively minor issue that is not relevant to core functionsA relatively minor issue that is not relevant to core functionsarea: formscross-cutting: typesfreq1: lowstate: confirmedtype: bug/fix