import type { FieldValues, UseFormReturn } from 'react-hook-form'; /** * Options for {@link useExternalSync}. * * @category Hooks */ export interface UseExternalSyncOptions { /** * If true, preserve dirty fields across an external reset. * Defaults to false (matches the common "I switched contexts; discard edits" * intent). */ keepDirty?: boolean; } /** * Reset a form's values when an externally-supplied source object's reference * changes; preserve in-progress edits while the reference is stable. * * Adopters with mismatched source-vs-form shapes pass a `toValues` projection. * * @example * ```tsx * const { form } = useZodForm(schema, { defaultValues: toValues(node) }); * useExternalSync(form, node, toValues); * ``` * * @category Hooks */ export declare function useExternalSync(form: UseFormReturn, source: TSource, toValues: (source: TSource) => TValues, options?: UseExternalSyncOptions): void; //# sourceMappingURL=useExternalSync.d.ts.map