Post

zod is amazing. zod omits unknown keys by default. this is dope for user input validation. this is not not dope when wrapping wrangler configuration deep in a codebase, implicitly omitting new features. you're *surprisingly* providing a subset of the language to the team. this will waste time.

0 reposts5 likes

if for some odd reason, you have to validate such things.. care about the evolution of the language you're wrapping. it is not owned by you. it'll expand faster than your wrapper. provide escape hatches (`passthrough`) or make sure others will expand the schema when needed (`strict()`).