Closed qw-in closed 1 month ago
Looks like this issue occurs any time the output shape has been altered via a transform
. This issue should probably be raised with zod
itself as well.
Here's a reproduction without zod-form-data: Typescript playground link
@airjp73 thanks for having a look, I'll open an upstream issue with your repro
I've reverted to v1.3.1 which has fixed the problem for me instead of doing a type assertion on the resulting error. Looking forward to seeing this fixed 👍
In the upstream issue, Colin said that this doesn't seem like a solvable issue. So, unfortunately, I'm going to close this issue for now until they have a resolution. :(
Which packages are impacted?
remix-validated-form
@remix-validated-form/with-zod
@remix-validated-form/with-yup
zod-form-data
What version of these packages are you using?
Please provide a link to a minimal reproduction of the issue.
https://codesandbox.io/s/silly-raman-8dsex1?file=/src/index.tsx
Steps to Reproduce the Bug or Issue
Note the type error on line 13:
Expected behavior
Was hoping to keep using
z.inferFlattenedErrors
but LMK if there is an alternative I should useScreenshots or Videos
No response
Platform
N/A
Additional context
No response