import { ChangeEvent, FocusEvent } from 'react';
declare type ErrorObject<T> = {
    [key in keyof Partial<T>]: boolean;
};
export declare function useFormState<T>(initialState: Partial<T>, validate: (state: Partial<T>) => null | {
    [key in keyof Partial<T>]: boolean;
}): {
    values: Partial<T>;
    isValid: boolean;
    errors: ErrorObject<T>;
    onChange: (e: ChangeEvent<HTMLInputElement> | {
        target: {
            name: string;
            value: ChangeEvent<HTMLInputElement>['target']['value'];
        };
    }) => void;
    onBlur: (e: FocusEvent<HTMLInputElement | HTMLSelectElement>) => void;
    forceValidation: () => boolean;
    reset: (values: T) => void;
};
export {};
//# sourceMappingURL=use-form-state.d.ts.map