diff --git a/packages/forms/src/model.ts b/packages/forms/src/model.ts index c84ea4565b2..558321bc54d 100644 --- a/packages/forms/src/model.ts +++ b/packages/forms/src/model.ts @@ -168,8 +168,7 @@ function isOptionsObj(validatorOrOpts?: ValidatorFn|ValidatorFn[]|AbstractContro */ export abstract class AbstractControl { /** @internal */ - // TODO(issue/24571): remove '!'. - _pendingDirty!: boolean; + _pendingDirty = false; /** * Indicates that a control has its own pending asynchronous validation in progress. @@ -179,15 +178,13 @@ export abstract class AbstractControl { _hasOwnPendingAsyncValidator = false; /** @internal */ - // TODO(issue/24571): remove '!'. - _pendingTouched!: boolean; + _pendingTouched = false; /** @internal */ _onCollectionChange = () => {}; /** @internal */ - // TODO(issue/24571): remove '!'. - _updateOn!: FormHooks; + _updateOn?: FormHooks; private _parent: FormGroup|FormArray|null = null; private _asyncValidationSubscription: any; @@ -298,7 +295,6 @@ export abstract class AbstractControl { * These status values are mutually exclusive, so a control cannot be * both valid AND invalid or invalid AND disabled. */ - // TODO(issue/24571): remove '!'. public readonly status!: FormControlStatus; /** @@ -369,7 +365,6 @@ export abstract class AbstractControl { * An object containing any errors generated by failing validation, * or null if there are no errors. */ - // TODO(issue/24571): remove '!'. public readonly errors!: ValidationErrors|null; /** @@ -415,7 +410,6 @@ export abstract class AbstractControl { * the UI or programmatically. It also emits an event each time you call enable() or disable() * without passing along {emitEvent: false} as a function argument. */ - // TODO(issue/24571): remove '!'. public readonly valueChanges!: Observable; /** @@ -426,7 +420,6 @@ export abstract class AbstractControl { * @see {@link AbstractControl.status} * */ - // TODO(issue/24571): remove '!'. public readonly statusChanges!: Observable; /**