import { FormikErrors } from 'formik'; import { Paths } from '../types'; /** * Provides tools to introspect validation errors for Formik-based forms. */ export declare function useErrorChecker(): { hasAnyError: (...paths: Paths[]) => boolean; }; /** * Recursively look up the names of fields that have errors, and join them using * path-syntax. * * Example: * * getErrorNames({foo: {bar: 'an error!'}}) * // ['foo', ['foo.bar']] * * @private */ export declare function getErrorNames(errors: FormikErrors): Paths[]; interface ValidationErrors { hasErrors: boolean; errors: string[]; } export declare const useValidationErrors: (name: string) => ValidationErrors; export interface ErrorListProps { errors: string[]; } export declare const ErrorList: React.FC; export {};