import { AnyObject } from '../types'; type ReasonRejectType = string | AnyObject | Error; export type ResolveType = (value: unknown) => void; export type RejectType = (reason?: ReasonRejectType) => void; export type ValidationObject = { [K in keyof T]: { error: boolean; msg: string; }; }; export declare function useForm(defaultState: T, validators?: Partial<{ [K in keyof T]: () => string; }>, onSubmit?: (data: T, resolve: ResolveType, reject: RejectType) => void | Promise, success?: ResolveType, error?: RejectType): { validationObject: ValidationObject; submitForm: () => Promise; sending: boolean; state: T; setState: import("react").Dispatch>; setPartialState: (value: Partial) => void; }; export {};