Open ravinggenius opened 2 months ago
I verified I'm using the latest version (zod@3.23.8
). I didn't check for any pre-release version or anything though. I did take a quick look through the source code, and I didn't see anything on the main
branch that indicated these methods were available for ZodReadonly
schemas.
Several methods for manipulating the shape of a schema are conspicuously missing just by marking a schema as read-only:
Everything is fine if I remove
.readonly()
fromLATEST_VERSION
andVERSIONED_ITEM
. However these schemas represent views in the database, so they are inherently read-only. Shouldn't we be able to mark schemas as read-only and still be able to use helpers like.pick()
,.omit()
and.shape
?Edit: formatting