import { Whatever } from '../../../types/whatever';
import { ChangeEvent, FocusEvent } from 'react';
export declare function useFormState<T extends {}>(initialState: T, validators: {
    [fieldName in keyof T]?: (value: string | T[keyof T]) => PromiseLike<Whatever> | string;
}): {
    errors: { [fieldName in keyof T]: string; };
    forceTouchedField: (fieldName: any) => void;
    forceTouchedFields: () => void;
    forceValidation: () => Promise<boolean>;
    isValid: boolean;
    onBlur: (event: FocusEvent<HTMLInputElement | HTMLSelectElement>) => Promise<void>;
    onChange: (event: ChangeEvent<HTMLInputElement> | {
        target: {
            name: keyof T;
            value: ChangeEvent<HTMLInputElement>['target']['value'];
        };
    }) => Promise<void>;
    reset: (newValues: T) => Promise<void>;
    setValues: import("react").Dispatch<import("react").SetStateAction<T>>;
    touchedFields: { [fieldName_1 in keyof T]: boolean; };
    validateField: (fieldName: keyof T, value?: string) => Promise<{ [fieldName in keyof T]: string; }>;
    values: T;
};
//# sourceMappingURL=use-form-state.d.ts.map