type ToObjectConfig = { /** * Pass array of keys that should not be normalized into number/bool when seen */ raw?: string[] | boolean; /** * Pass array of keys that should only have a single value (e.g., 'action') */ single?: string[]; /** * Whether or not we should normalize booleans, defaults to true if not set */ normalize_bool?: boolean; /** * Whether or not we should normalize null, defaults to true if not set */ normalize_null?: boolean; /** * Whether or not we should normalize dates, defaults to true if not set */ normalize_date?: boolean; /** * Whether or not we should normalize numbers, defaults to true if not set */ normalize_number?: boolean; }; /** * Converts a FormData instance to a json object * Eg: * const form = new FormData(); * form.append('name', 'Alice'); * form.append('hobbies', 'reading'); * form.append('hobbies', 'writing'); * form.append('emptyField', ''); * toObject(form); * * {name: 'Alice', hobbies: ['reading', 'writing'], emptyField: ''} * * @param {FormData} val - FormData instance to convert to an object * @param {ToObjectConfig?} config - Config for conversion */ declare function toObject>(form: FormData, config?: ToObjectConfig): T; export { toObject, toObject as default };