import { AbstractControl, AbstractControlOptions, AsyncValidatorFn, FormGroup, ValidatorFn, ValidationErrors } from '@angular/forms'; import { Observable } from 'rxjs'; /** * Typed FormGroup. */ export declare class TypedFormGroup extends FormGroup { /** @inheritdoc */ readonly value: T; /** @inheritdoc */ readonly valueChanges: Observable; /** holds a map with control names to possible validator names */ readonly registeredValidatorsMap: { [controlName in keyof T]: string[]; }; /** @inheritdoc */ constructor(controls: { [key in keyof T]: AbstractControl; }, validatorOrOpts?: ValidatorFn | Array | AbstractControlOptions | null, asyncValidator?: AsyncValidatorFn | Array | null); /** @inheritdoc */ patchValue(value: Partial | T, options?: { onlySelf?: boolean; emitEvent?: boolean; }): void; /** @inheritdoc */ get(path: Array> | Extract): AbstractControl | null; /** * Returns group if available. * * @param path path to group */ getNestedGroup(path: Extract): TypedFormGroup | null; /** * Detects if an error is present for given control name. * * @param name control name of the form group */ hasControlErrors(name: Extract): boolean; /** * Detects if control has validator for given control name and validator name. * * @param name control name of the form group * @param validatorName validator name */ isValidatorRegistered(name: Extract, validatorName: string): boolean; /** * Returns an error key for the next error. * * @param name control key of the form group */ nextControlErrorKey(name: Extract): string; /** * Dispatches errors to this control and to child controls using given error map. * * @param errors error map * @param contextPath optional context path to errors set to */ dispatchErrors(errors: { [key: string]: ValidationErrors; }, contextPath?: string): void; }