import { FormArrayState, FormControlState, FormGroupState } from '../interfaces/Form'; import { FormGroup } from '../models/FormGroup'; import { FormControl } from '../models/FormControl'; import { FormArray } from '../models/FormArray'; import { AbstractControl } from '../models/AbstractControl'; export declare class FormBuilder { /** * @description * Construct a new `FormGroup` instance. * * @param state A collection of child controls. The key for each child is the name * under which it is registered. * * @param options options options object for the `FormGroup`. The object can * have two shapes: * * 1) `AbstractControlOptions` object (preferred), which consists of: * * `types`: A synchronous validator function, or an array of validator functions * * `asyncValidators`: A single async validator or array of async validator functions * * `updateOn`: The event upon which the control should be updated (options: 'change' | 'blur' | * submit') * * 2) Legacy options object, which consists of: * * `validator`: A synchronous validator function, or an array of validator functions * * `asyncValidator`: A single async validator or array of async validator functions * */ group: (state: FormGroupState) => FormGroup; /** * @description * Construct a new `FormControl` with the given state, types and options. * * @param state A collection of child controls. The key for each child is the name * under which it is registered. * * @param options options options object for the `FormGroup`. The object can * have two shapes: * * * @usageNotes * * ### Initialize a control as disabled * * The following example returns a control with an initial value in a disabled state. * * * */ control(state: FormControlState): FormControl; /** * Constructs a new `FormArray` from the given array of configurations, * types and options. * * @param controlsConfig An array of child controls or control configs. Each * child control is given an index when it is registered. * * @param validatorOrOpts A synchronous validator function, or an array of * such functions, or an `AbstractControlOptions` object that contains * validation functions and a validation trigger. * * @param asyncValidator A single async validator or array of async validator * functions. */ array: (state: AbstractControl[] | FormControlState[]) => FormArray; /** @internal */ _reduceControls(controlsConfig: FormGroupState | FormArrayState | FormControlState[]): FormGroupState | FormArrayState; /** @internal */ _createControl(controlConfig: any): AbstractControl; }