UNPKG

zod-auto-form

Version:

Auto-generate typed React forms from Zod schemas

9 lines (8 loc) 665 B
import type { z } from "zod"; import type { FieldVisibilityRule } from "../types/visibility-rules"; declare const getNestedValue: (obj: Record<string, unknown>, path: string | string[]) => unknown; declare const shouldApplyRule: <T extends z.ZodSchema>(rule: FieldVisibilityRule<T>, formValues: Record<string, unknown>) => boolean; declare const cleanPath: (path: string) => string; declare const mergeDefaultValues: (userDefaults: Record<string, unknown>, zodDefaults: Record<string, unknown>) => Record<string, unknown>; declare function removeNullValues<T>(obj: T): T; export { cleanPath, getNestedValue, mergeDefaultValues, shouldApplyRule, removeNullValues };