We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9977fb0 commit 9a0757aCopy full SHA for 9a0757a
packages/zod/src/v4/core/errors.ts
@@ -330,7 +330,7 @@ export type $ZodErrorTree<T, U = string> = T extends util.Primitive
330
: T extends [any, ...any[]]
331
? { errors: U[]; items?: { [K in keyof T]?: $ZodErrorTree<T[K], U> } }
332
: T extends any[]
333
- ? { errors: U[]; items?: Array<$ZodErrorTree<T[number], U>> }
+ ? { errors: U[]; items?: Array<$ZodErrorTree<T[number], U> | undefined> }
334
: T extends object
335
? { errors: U[]; properties?: { [K in keyof T]?: $ZodErrorTree<T[K], U> } }
336
: { errors: U[] };
0 commit comments