export declare type FormValue = { [key: string]: any; }; /** * Fills in a DOM form using values from a JavaScript object. * Note that fields not specified in the value object will be cleared. * * @param form The DOM form to set values in * @param object An object containing values for each field in the form * * @example * let formNode = document.getElementById('aForm'); * form.fromObject(formNode, { firstName: 'foo', lastName: 'bar' }); */ export declare function fromObject(form: HTMLFormElement, object: FormValue): void; /** * Serializes the values of a DOM form into a JavaScript object. * * @param form The DOM form to get values from * @returns An object mapping the name of each form field to its value(s) * * @example * let formNode = document.getElementById('aForm'); * let values = form.toObject(formNode); * console.log(values.firstName); // 'foo' */ export declare function toObject(form: HTMLFormElement): FormValue;