import { AbstractControlOptions, ValidatorFn, AsyncValidatorFn, FormGroup } from "@angular/forms"; import { ControlState } from "./control-state"; import { ControlConfig } from './control-config'; import { IFormGroup } from './i-form-group'; import { IFormArray } from './i-form-array'; import { IFormControl } from './i-form-control'; export interface IFormBuilder { array(controlsConfig: ControlConfig[], validatorOrOpts?: ValidatorFn | ValidatorFn[] | AbstractControlOptions | null, asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null): IFormArray; control(formState: ControlState, validatorOrOpts?: ValidatorFn | ValidatorFn[] | AbstractControlOptions | null, asyncValidator?: AsyncValidatorFn | AsyncValidatorFn[] | null): IFormControl; group(controlsConfig: { [key: string]: any; }, options?: AbstractControlOptions | { [key: string]: any; } | null): FormGroup; group(controlsConfig: { [key in keyof T]: ControlConfig; }, options?: AbstractControlOptions | { [key: string]: any; } | null): IFormGroup; }