21 ms·
oh i guess you use zod in every single part of your application? not just api level. i was suggesting the result of zod parse is a type that shows how it’s bee
by marcelr 10mo ago
oh i guess you use zod in every single part of your application? not just api level.
i was suggesting the result of zod parse is a type that shows how it’s been refined
however, .ipv4().parse(“..”) returns a type “string”
- marcelr 10mo agothere’s problem with branded types this way now that i think of it string type nonEmptyStr = string & NonEmpty type ipv4Str = string & IPv4 it’s not obvious how you’d automatically determine ipv4Str is also a nonEmptyStr, since the types themselves are just labels, they don’t store the refinements at type level