import { MutableRefObject } from "react"; import { FieldInstance } from "./types"; import { FieldArrayInstance } from "../field-array"; export type InternalValue = { __value: T; __isResetting: boolean; }; export declare const isInternal: (value: any) => value is InternalValue; interface UseListenToListenToArrayProps { listenTo: string[] | undefined; runFieldValidation: (l: "onChangeValidate" | "onBlurValidate" | "onMountValidate", v: T) => void; valueRef: MutableRefObject; } export declare function useListenToListenToArray({ listenTo, runFieldValidation, valueRef, }: UseListenToListenToArrayProps): void; type GetInstanceInferedType = TT extends FieldInstance ? T : T[]; export interface UseFieldLikeProps | FieldArrayInstance> { props: TT["props"] & { initialValue?: GetInstanceInferedType; }; initialValue: GetInstanceInferedType; } /** * A "field-like" is anything that contains a value, * errors, and needs to be set to the closest form */ export declare const useFieldLike: | FieldArrayInstance>({ initialValue, props, }: UseFieldLikeProps) => { value: GetInstanceInferedType; setErrors: import("react").Dispatch>; errors: string[]; hints: string[]; setHints: import("react").Dispatch>; setIsDirty: import("react").Dispatch>; setIsTouched: import("react").Dispatch>; setValue: = GetInstanceInferedType>(val: J | ((prevState: J) => J)) => void; isTouched: boolean; isDirty: boolean; isValid: boolean; isValidating: boolean; isSubmitted: boolean; runFieldValidation: (validationFnName: "onChangeValidate" | "onBlurValidate" | "onMountValidate", val: GetInstanceInferedType) => void; runFieldHintCheck: (validationFnName: "onChangeHint" | "onBlurHint" | "onMountHint", val: GetInstanceInferedType) => void; valueRef: MutableRefObject>; validate: (validationFnName: "onChangeValidate" | "onBlurValidate" | "onMountValidate") => void; checkHint: (validationFnName: "onBlurHint" | "onMountHint" | "onChangeHint") => void; _normalizedDotName: string; _setIsValidating: import("react").Dispatch>; }; export {};