import { AbstractControl } from '@angular/forms' ; import { defer , merge , of , Observable } from 'rxjs' ; import { map } from 'rxjs/operators' ; import { FormStatus } from '../internals' ; export function formControlStatus$ ( formControl ) { return merge ( defer ( ( ) => of ( formControl . status as FormStatus ) ) , formControl . statusChanges . pipe ( map ( ( ) => formControl . status as FormStatus ) ) ) ; }