fix(forms): fix Zod v4 compatibility in zodResolver type declaration#220
fix(forms): fix Zod v4 compatibility in zodResolver type declaration#220YevheniiKotyrlo wants to merge 1 commit into
Conversation
e795395 to
4b2ad78
Compare
4b2ad78 to
82a1bf7
Compare
|
Hi — just checking in on this PR. Is there anything else needed from my side? This is a one-line type fix — the current Rebased on latest |
|
@YevheniiKotyrlo did you manage to have some answers ? |
|
@aboudard No luck so far — it's been over a month with no response. The repo seems quiet recently. Based on git history, @tugcekucukoglu and @mertsincan are the main contributors but neither has been active lately. Happy to coordinate if you find a way through. |
Defect Fixes
Fixes #219
The
zodResolvertype declaration importsParseParamsfromzod, which was removed in Zod v4. This causesTS2305: Module '"zod"' has no exported member 'ParseParams'for projects using Zod v4 withskipLibCheck: false.Change
Replace
ParseParamswithParameters<T['parse']>[1], which uses TypeScript's built-inParametersutility to infer the second argument type of the schema'sparse()method. This automatically resolves to:InexactPartial<ParseParams>(={ path?, errorMap?, async? })ParseContext<$ZodIssue>(={ error?, reportInput?, jitless? })The approach is forward-compatible with any future Zod version — no maintenance burden.
Impact
.mjsbundle is unchangedParseContextautocompleteRelated: #33, #187