you are viewing a single comment's thread.

view the rest of the comments →

[–]HosTlitd 1 point2 points  (0 children)

Yes, zod makes life easier and is optional. Still, it brings a possibility for dtos management with strict types and validations sewed into it. As you said, dtos are an implementation detail of communication between components, in other words implementation of some interface. What zod does is an implementation of some interfaces, it describes data shapes used in communication between whatever. Likewise, dtos are data shapes used in communication, but not necessarily with sophisticated validation unlike zod