ITADN

Support for Zod 4

#297Openjtmueller 创建于 2025-09-29
enhancement
J
jtmuellercommented
I would love to see a version that's compatible with [Zod 4](https://zod.dev/v4). It's currently the only thing preventing me from upgrading Zod in my project, and I'd very much like to upgrade Zod to take advantage of the dramatic performance and bundle-size improvements. If I try to update to Zod 4, every single call to `zodForm` raises TypeScript errors such as: ``` error TS2345: Argument of type 'ZodObject<{ email: ZodString; password: ZodString; }, $strip>' is not assignable to parameter of type 'ZodType<any, any, FieldValues>'. Types of property 'def' are incompatible. Type '$ZodObjectDef<{ email: ZodString; password: ZodString; }>' is not assignable to type 'FieldValues | FieldValue | (FieldValues | FieldValue)[]'. Type '$ZodObjectDef<{ email: ZodString; password: ZodString; }>' is not assignable to type 'FieldValues'. Index signature for type 'string' is missing in type '$ZodObjectDef<{ email: ZodString; password: ZodString; }>'. 93 validate: zodForm(LoginVerificationSchema), ```
3 条评论