Zod · Method
.passthrough
.passthrough() makes a Zod object keep unknown properties during parsing. In Zod 4, use z.looseObject() for new code.
Last updated
Syntax
z.object(shape).passthrough()In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
z.looseObject()z.strictObject()z.object()parse()