import React from 'react'; import { AnyObject } from '../types'; declare type ErrorRecord = Record; declare type Validators = Partial>; interface FormOptions { validators?: Validators; initialValues?: Partial; onChange?: (value: T) => void; onSubmit?: () => void; } interface Validation { required?: { value: boolean; message: string; }; pattern?: { value: string; message: string; }; custom?: { isValid: (value: string) => boolean; message: string; }; } interface FormState { data: T; errors: ErrorRecord | null; handleChange: (event: React.ChangeEvent) => void; handleSubmit: (event: React.SyntheticEvent) => void; } export declare const useForm: = Record>({ validators, initialValues, onChange, onSubmit, }: FormOptions) => FormState; export {}; //# sourceMappingURL=useForm.d.ts.map