import * as React from 'react'; import { FormikConfig, FormikErrors, FormikState, FormikTouched, FormikValues, FieldMetaProps, FieldHelperProps, FieldInputProps } from './types'; export declare function useFormik({ validateOnChange, validateOnBlur, validateOnMount, isInitialValid, enableReinitialize, onSubmit, ...rest }: FormikConfig): { initialValues: Values; initialErrors: FormikErrors; initialTouched: FormikTouched; initialStatus: any; handleBlur: { (e: React.FocusEvent): void; (fieldOrEvent: T): T extends string ? (e: any) => void : void; }; handleChange: { (e: React.ChangeEvent): void; >(field: T_1): T_1 extends React.ChangeEvent ? void : (e: string | React.ChangeEvent) => void; }; handleReset: (e: any) => void; handleSubmit: (e?: React.FormEvent | undefined) => void; resetForm: (nextState?: Partial> | undefined) => void; setErrors: (errors: FormikErrors) => void; setFormikState: (stateOrCb: FormikState | ((state: FormikState) => FormikState)) => void; setFieldTouched: (field: string, touched?: boolean, shouldValidate?: boolean | undefined) => Promise> | Promise; setFieldValue: (field: string, value: any, shouldValidate?: boolean | undefined) => Promise> | Promise; setFieldError: (field: string, value: string | undefined) => void; setStatus: (status: any) => void; setSubmitting: (isSubmitting: boolean) => void; setTouched: (touched: FormikTouched, shouldValidate?: boolean | undefined) => Promise> | Promise; setValues: (values: React.SetStateAction, shouldValidate?: boolean | undefined) => Promise> | Promise; submitForm: () => Promise; validateForm: (values?: Values) => Promise>; validateField: (name: string) => Promise | Promise; isValid: boolean; dirty: boolean; unregisterField: (name: string) => void; registerField: (name: string, { validate }: any) => void; getFieldProps: (nameOrOptions: any) => FieldInputProps; getFieldMeta: (name: string) => FieldMetaProps; getFieldHelpers: (name: string) => FieldHelperProps; validateOnBlur: boolean; validateOnChange: boolean; validateOnMount: boolean; values: Values; errors: FormikErrors; touched: FormikTouched; isSubmitting: boolean; isValidating: boolean; status?: any; submitCount: number; }; export declare function Formik(props: FormikConfig & ExtraProps): JSX.Element; /** * Transform Yup ValidationError to a more usable object */ export declare function yupToFormErrors(yupError: any): FormikErrors; /** * Validate a yup schema. */ export declare function validateYupSchema(values: T, schema: any, sync?: boolean, context?: any): Promise>; /** * Recursively prepare values. */ export declare function prepareDataForValidation(values: T): FormikValues;