import { SyntheticEvent } from 'react';
interface FormMethods<V> {
    values: V;
    setValues: (values: V) => void;
    isSubmitting: boolean;
    onSubmit: (e: SyntheticEvent) => void;
    errors: FormErrors<V>;
    register: <K extends keyof V>(field: K, options?: {
        type?: 'number';
    }) => {
        value: V[K];
        onChange: (value: V[K] | null | undefined) => void;
    };
}
declare type FormErrors<V> = {
    [K in keyof V]?: string;
};
declare type FormHandler<V> = (values: V, setError: (field: keyof V, error: string) => void, setValues: (values: V) => void) => void | Promise<any>;
export declare const useForm: <V>(initialValues: V, handler?: FormHandler<V> | undefined) => FormMethods<V>;
export {};
//# sourceMappingURL=useForm.d.ts.map