-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Support merging ZodEffects (created from an object) into other objects #1147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Correct, after a |
Has someone managed to resolve that? I have this problema, I use .refine and now want to use .pick but it not exist on ZodEffect. |
This chaotic end-typing has apparently been reworked in Zod 4 to a single consistent type. I can't wait for the release 😃 |
Can I read about this somewhere? Would it mean I could use pick on a refined object schema? |
A maybe you meant this: #2474 (comment) |
Maybe try this: #1147(comment) |
I've created a ZodEffects schema as follows:
Now I want to merge
myObjSchema
into another object, like so:But I can't, because
merge
is expecting anAnyZodObject
argument and not aZodEffects
argument.The text was updated successfully, but these errors were encountered: