Hacker News new | ask | show | jobs
by nicky0 1204 days ago
With Zod: const info = z.object({ name: z.string().min(1), email: z.string().email() }
1 comments

Have you seen ArkType (https://github.com/arktypeio/arktype)? Similar parse-based approach to validation with a significantly more concise definition syntax:

const info = type({ name: "string>0", email: "email" })

No, but I'm a heavy Zod user so ArkType it looks interesting. Thanks for the tip!

Are there any compelling reasons to switch apart from the difference in syntax?