Skip to content
masterclass Buddy

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.

Subscribe
  • z.object()
  • ZodObject.extend()
  • ZodObject.shape
  • z.intersection()

Source: Migration guide | Zod. Checked 2026-11-03.