mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
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:
committed by
Dylan Hunn
parent
14e24ac1ff
commit
dedbc2c5d5
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user