From dedbc2c5d5943a6f52b76283fda46777bdb7f9b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Exbrayat?= Date: Thu, 23 Jun 2022 18:49:13 +0200 Subject: [PATCH] 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 --- packages/forms/src/form_builder.ts | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/packages/forms/src/form_builder.ts b/packages/forms/src/form_builder.ts index e9bce0cab7d..be83deaeaed 100644 --- a/packages/forms/src/form_builder.ts +++ b/packages/forms/src/form_builder.ts @@ -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 is a tuple containing a value of type T, plus optional validators and async * validators.