Skip to content

Commit 279e6b8

Browse files
kwAndrewKushnir
kw
authored andcommitted
docs: Correct comments for FormControl (#58352)
PR Close #58352
1 parent 07cc97f commit 279e6b8

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

packages/forms/src/model/form_control.ts

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -379,14 +379,11 @@ export interface ɵFormControlCtor {
379379
/**
380380
* Creates a new `FormControl` instance.
381381
*
382-
* @param formState Initializes the control with an initial value,
382+
* @param value Initializes the control with an initial value,
383383
* or an object that defines the initial value and disabled state.
384384
*
385-
* @param validatorOrOpts A synchronous validator function, or an array of
386-
* such functions, or a `FormControlOptions` object that contains validation functions
387-
* and a validation trigger.
388-
*
389-
* @param asyncValidator A single async validator or array of async validator functions
385+
* @param opts A `FormControlOptions` object that contains validation functions and a
386+
* validation trigger. `nonNullable` have to be `true`
390387
*/
391388
new <T = any>(
392389
value: FormControlState<T> | T,
@@ -412,6 +409,18 @@ export interface ɵFormControlCtor {
412409
asyncValidator: AsyncValidatorFn | AsyncValidatorFn[],
413410
): FormControl<T | null>;
414411

412+
/**
413+
* Creates a new `FormControl` instance.
414+
*
415+
* @param value Initializes the control with an initial value,
416+
* or an object that defines the initial value and disabled state.
417+
*
418+
* @param validatorOrOpts A synchronous validator function, or an array of
419+
* such functions, or a `FormControlOptions` object that contains validation functions
420+
* and a validation trigger.
421+
*
422+
* @param asyncValidator A single async validator or array of async validator functions
423+
*/
415424
new <T = any>(
416425
value: FormControlState<T> | T,
417426
validatorOrOpts?: ValidatorFn | ValidatorFn[] | FormControlOptions | null,

0 commit comments

Comments
 (0)