mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
docs: Documents utility functions for narrowing form control types (#64373)
PR Close #64373
This commit is contained in:
committed by
Andrew Kushnir
parent
98189d47a6
commit
479ffc1d4e
@@ -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;
|
||||
|
||||
@@ -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 =>
|
||||
|
||||
@@ -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 =>
|
||||
|
||||
Reference in New Issue
Block a user