A proof of concept of a tree shakable Zod alternative. This library aims to have a 1:1 Zod compatible API, but with fine grain control over the final bundle size. This was done by a combination of Proxies and type-level programming.
Limitation: Zod allows chaining .or multiple times, like z.string().or(z.number()).or(z.boolean()), but this PR limits only one-time.
I couldn't make it 🤷♂️
I hope TypeScript experts fix this.
Part of #2
Limitation: Zod allows chaining
.or
multiple times, likez.string().or(z.number()).or(z.boolean())
, but this PR limits only one-time. I couldn't make it 🤷♂️ I hope TypeScript experts fix this.