-
Notifications
You must be signed in to change notification settings - Fork 5
Possible to pick/omit? #210
Comments
const zodOfDocument: ZodType = s.document({ ... }).zod;
// Do what you want with zodOfDocument |
Thanks, I tried that, but TypeScript says:
|
can you show me a repro? Your code snippet has |
Here is a codesandbox: https://codesandbox.io/s/silent-thunder-7pg960?file=/src/App.tsx |
ah, I see. the object returned is of type |
That would be great, thank you. Awesome library btw! |
FYI until we fix it, you should just be able to cast it into a ZodObject. I think it actually is a ZodObject so this shouldn’t be an issue. |
Yeah I actually tried that for awhile the other day. I settled on using |
Hi, I'm trying to utilize my existing sanity-typed-schema-builder document to create a new Zod document. I want to pick fields from the former to add to the latter. Is this possible somehow?
Example:
Thanks
The text was updated successfully, but these errors were encountered: