Hey everyone, I seem to have run into an issue but I'm unsure if this is by design or there's a way around this.
z.infer seems to skip an entire schema and only shows a schema of shared fields only for a nested field with a union type.
field: z
.union([zod1Schema, zod2Schema])
.nullable()
.optional(),
The result is a type that only shows what's shared between the two schemas and ignores fields from zod2Schema.
Hey everyone, I seem to have run into an issue but I'm unsure if this is by design or there's a way around this. z.infer seems to skip an entire schema and only shows a schema of shared fields only for a nested field with a union type.
The result is a type that only shows what's shared between the two schemas and ignores fields from zod2Schema.