mieszkosabo / correttore

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.
92 stars 5 forks source link

Add or operation #13

Closed exoego closed 6 months ago

exoego commented 6 months ago

Part of #2

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.

mieszkosabo commented 6 months ago

Thanks for giving it a try, I'll take a look at it soon and see if I can make it work 👍