Created
August 12, 2025 17:19
-
-
Save Maxiviper117/9915713c36b7353de550595d16d73e57 to your computer and use it in GitHub Desktop.
Zod V4 Treeify Schema for Flattened Treeify Errors
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const TreeifyErrorNode: z.ZodType<any> = z.lazy(() => | |
| z.object({ | |
| errors: z.array(z.string()), | |
| properties: z.record(z.string(), TreeifyErrorNode).optional(), | |
| items: z.array(TreeifyErrorNode.or(z.undefined())).optional(), | |
| }) | |
| ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment