t
tRPC
t
tRPC
Zod Branded Type
Original message was deleted
tRPC
Join
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,111
Members
View on Discord
A
Alex / KATT 🐱
•
1/11/23, 3:28 PM
we should do
, can you make a reproduction and create an issue
?
A
Alex / KATT 🐱
•
1/11/23, 9:59 PM
https://github.com/trpc/trpc/issues/3602#issuecomment-1379539304
A
Alex / KATT 🐱
•
1/11/23, 10:00 PM
if you create a discussion in the zod
, please post it here
! interesting edge
-case
A
Alex / KATT 🐱
•
1/11/23, 10:01 PM
I also want to move towards using branded strings more so I
'm very curious about this
A
Alex / KATT 🐱
•
1/12/23, 12:49 AM
I don
't really agree with the motivation there since a branded type doesn
't really mean anything on
either
end
A
Alex / KATT 🐱
•
1/12/23, 12:50 AM
And it
'd make sense to me that
'd be okay to enforce on the input too
& that you
'd have to explicitly typecast to get though the validator
, otherwise it
's just loose
A
Alex / KATT 🐱
•
1/12/23, 12:50 AM
Zod likes strictness
, doing it on both ends seems better to me
A
Alex / KATT 🐱
•
1/12/23, 12:51 AM
We
're unlikely to do this on trpc
's side as we
're not tied to zod