Zod · Method
.merge
Zod 4 deprecates .merge() for object schemas. Use .extend() with another schema's .shape, or combine shapes with object spread.
Last updated
Syntax
BaseSchema.extend(AdditionalSchema.shape)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
z.object()ZodObject.extend()ZodObject.shapez.intersection()