Skip to content

fix(zodv4): fixed properties generation for zodv4#1259

Closed
oskarstucki wants to merge 1 commit intoCode-Hex:mainfrom
oskarstucki:main
Closed

fix(zodv4): fixed properties generation for zodv4#1259
oskarstucki wants to merge 1 commit intoCode-Hex:mainfrom
oskarstucki:main

Conversation

@oskarstucki
Copy link
Copy Markdown

@oskarstucki oskarstucki commented Oct 10, 2025

This is a fix for issue #1251

@pirate-max
Copy link
Copy Markdown

I was also facing unknown type issues when using the generated zodv4 schemas with the zodResolver from @hookform/resolvers. Adding the change manually to the generated file fixes those issues 👍

@Code-Hex
Copy link
Copy Markdown
Owner

Closing this because the Zod v4 Properties typing issue was fixed in #1423, covering both #1251 and the later optional-property report in #1362.

The fix on main is broader than this one-line change. It keeps optional properties behaving correctly in inferred Zod v4 types and has generated TypeScript compile coverage, so merging this branch now would move the code backward.

Thanks for the small focused patch. It pointed at the right broken spot.

@Code-Hex Code-Hex closed this Apr 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants