refactor(forms): remove unused internal function (#46479)

The `isFormControlOptions` function is never used, and can be safely removed as it is not a public API.

PR Close #46479
This commit is contained in:
Cédric Exbrayat 2022-06-23 18:49:13 +02:00 committed by Dylan Hunn
parent 14e24ac1ff
commit dedbc2c5d5

View file

@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/
import {inject, Injectable, InjectionToken} from '@angular/core';
import {inject, Injectable} from '@angular/core';
import {AsyncValidatorFn, ValidatorFn} from './directives/validators';
import {ReactiveFormsModule} from './form_providers';
@ -23,14 +23,6 @@ function isAbstractControlOptions(options: AbstractControlOptions|{[key: string]
(options as AbstractControlOptions).updateOn !== undefined);
}
function isFormControlOptions(options: FormControlOptions|{[key: string]: any}|null|
undefined): options is FormControlOptions {
return !!options &&
(isAbstractControlOptions(options) ||
(options as FormControlOptions).initialValueIsDefault !== undefined ||
(options as FormControlOptions).nonNullable !== undefined);
}
/**
* ControlConfig<T> is a tuple containing a value of type T, plus optional validators and async
* validators.