import { RuleItem } from 'async-validator'; import { FieldNode } from './utils'; export declare type ValidateMode = 'change' | 'focusout' | 'submit'; export declare type FormOptions = { defaultValues?: Values; shouldUnregister?: boolean; validateMode?: ValidateMode; }; export declare type FieldOptions = { rule?: RuleItem; }; export declare type Error = { message: string; field: string; }; export declare type Errors = { [field: string]: Error[] | undefined; }; export declare const useForm: (options?: FormOptions) => { values: import("vue-demi").UnwrapRef; useField: (path: string | (string | number)[], options?: FieldOptions) => { ref: (nodeRef: FieldNode) => void; value: any; error: Error[] | undefined; validate: () => Promise; }; get: (path: string, defaultValue?: any) => any; set: (path: string, value: any) => any; getFieldValues: () => Partial; validateFields: () => Promise; validateField: (path: any) => Promise; errors: Errors; handleSubmit: (onSubmit: (fieldValues: Partial) => any) => (e?: Event | undefined) => Promise; };