zod-fast-check icon indicating copy to clipboard operation
zod-fast-check copied to clipboard

Support ZodReadonly

Open pdonnelly3 opened this issue 1 year ago • 1 comments

a readonly schema results in the error Unable to generate valid values for Zod schema. 'ZodReadonly' schemas are not supported (at path '.').

Based on what zod does under the hood, do a map and return Object.freeze() on the value.

pdonnelly3 avatar Dec 12 '24 22:12 pdonnelly3

I would like it if this worked as well. Currently I'm carrying a bunch of override calls to handle places in my schemas where I have read-only properties.

exarkun avatar Aug 13 '25 15:08 exarkun