/** A value for an input-like field */ export type FormValue = string | string[] | number | number[] | boolean | boolean[]; /** An object containing all the FormValues for a form */ export type FormValues = Record; /** * Extracts form values from a `form` element, such as e.target from form.onSubmit * * - An alternative to the FormData api, aiming to be more predictable, flexible and less awkward. * - For example, FormData has not great way to enumerate all fields (even ones with undefined * values) or multiple checkboxes or multi selects. * - Handles text, number, checkboxes, radio buttons, textarea, select * - Converts US phone numbers to international format * - Value = array if multiple inputs with same 'name', such as checkboxes * - Limitation: Can't handle complex forms (multipart/form-data encoding) * * @usage [Code Sandbox](https://codesandbox.io/s/form-to-json-y7cs3t?file=/src/App.tsx) */ export declare function formToValues(formElement: HTMLFormElement): FormValues;