import { FormControl } from "./formControl"; import type { FormControlElement } from "./formControlElement"; import type { FormProperties } from "./formProperties"; import type { ErrorMap, Validator } from "./validator"; export declare class Form { /** * Function for creating a Form * @remarks This allows us to specify the index signatures in the class */ static create(initialData: FormProperties, notifyListeners: Function): Form & FormControlsSpecified & FormControlsUnspecified; private readonly _notifyListeners; get valid(): boolean; get touched(): boolean; get values(): FormValues; set touched(value: boolean); private constructor(); /** Reset the whole form */ reset(): void; /** @internal Add a form conrol to the Form */ _addControl(name: string, initial?: string, validators?: Validator[], elements?: FormControlElement[], errorMap?: ErrorMap): void; private forEachControl; } export declare class FormControlMissingError extends Error { } export type FormControlsUnspecified = { [key: string]: FormControl | undefined; }; export type FormControlsSpecified = { [K in Keys]: FormControl; }; export type FormValues = Partial> & Record;