| 20 | import {FormGroup, FormRecord, UntypedFormGroup} from './model/form_group'; |
| 21 | |
| 22 | function isAbstractControlOptions( |
| 23 | options: AbstractControlOptions | {[key: string]: any} | null | undefined, |
| 24 | ): options is AbstractControlOptions { |
| 25 | return ( |
| 26 | !!options && |
| 27 | ((options as AbstractControlOptions).asyncValidators !== undefined || |
| 28 | (options as AbstractControlOptions).validators !== undefined || |
| 29 | (options as AbstractControlOptions).updateOn !== undefined) |
| 30 | ); |
| 31 | } |
| 32 | |
| 33 | /** |
| 34 | * The union of all validator types that can be accepted by a ControlConfig. |