by techpression · 4mo ago · 0 comments
Yes, it's a skill issue, but oh dear the amount of developers who have that issue.
At worst, TS can only really be as bad as JS, no?
”Look the type says the data has this shape”, but it doesn’t. This has led to so many cases of ”no data validation” in my experience, how people solve that is usually then with zod, and now you have added a massive runtime dependency instead of local validation.
Even without TS, I'd be using zod (or a similar library). I haven't had any issues with zod's bundle size, and I don't see a good reason to write custom encoders/decoders everywhere.