docs: Documents utility functions for narrowing form control types (#64373)

PR Close #64373
This commit is contained in:
SkyZeroZx
2025-10-12 13:29:45 -05:00
committed by Andrew Kushnir
parent 98189d47a6
commit 479ffc1d4e
4 changed files with 35 additions and 0 deletions
+2
View File
@@ -582,6 +582,8 @@ export const UntypedFormArray: UntypedFormArrayCtor = FormArray;
* @description
* Asserts that the given control is an instance of `FormArray`
*
* @see [Utility functions for narrowing form control types](guide/forms/reactive-forms#utility-functions-for-narrowing-form-control-types)
*
* @publicApi
*/
export const isFormArray = (control: unknown): control is FormArray => control instanceof FormArray;
+2
View File
@@ -621,6 +621,8 @@ export const UntypedFormControl: UntypedFormControlCtor = FormControl;
* @description
* Asserts that the given control is an instance of `FormControl`
*
* @see [Utility functions for narrowing form control types](guide/forms/reactive-forms#utility-functions-for-narrowing-form-control-types)
*
* @publicApi
*/
export const isFormControl = (control: unknown): control is FormControl =>
+4
View File
@@ -709,6 +709,8 @@ export const UntypedFormGroup: UntypedFormGroupCtor = FormGroup;
* @description
* Asserts that the given control is an instance of `FormGroup`
*
* @see [Utility functions for narrowing form control types](guide/forms/reactive-forms#utility-functions-for-narrowing-form-control-types)
*
* @publicApi
*/
export const isFormGroup = (control: unknown): control is FormGroup => control instanceof FormGroup;
@@ -827,6 +829,8 @@ export interface FormRecord<TControl> {
* @description
* Asserts that the given control is an instance of `FormRecord`
*
* @see [Utility functions for narrowing form control types](guide/forms/reactive-forms#utility-functions-for-narrowing-form-control-types)
*
* @publicApi
*/
export const isFormRecord = (control: unknown): control is FormRecord =>