From 1a9d86a4cc768b0e0f69742fd0021b3a23e120e6 Mon Sep 17 00:00:00 2001 From: Kristin Lindquist Date: Thu, 1 Sep 2022 07:18:33 -0600 Subject: [PATCH] 16: strict on zod objects within union --- src/transformer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/transformer.ts b/src/transformer.ts index 95ec372..4895489 100644 --- a/src/transformer.ts +++ b/src/transformer.ts @@ -278,7 +278,7 @@ export default class Transformer { return this.wrapWithZodObject(fields) + '.strict()'; } - const wrapped = fields.map((field) => this.wrapWithZodObject(field)); + const wrapped = fields.map((field) => this.wrapWithZodObject(field) + '.strict()'); return this.wrapWithZodOUnion(wrapped); }