News for hackers. Stuff that matters.
Re:Zod v4 Beta by cianuro_ on Sunday April 13, 2025 @12:14PM (#43673856)
Yes, I agree. Some sort of check has to happen somewhere to validate the incoming payload. If you’re looking for type safety, it makes sense to use Zod for this.

To me it is bending the original tool (JS, async driven, weak typing) to fit a purpose it was not made for (hard typing, synchronous) in detriment of what it is that makes the tool good in the first place (IO performance).

Re:Zod v4 Beta by shepherdjerred on Sunday April 13, 2025 @04:27PM (#43675606)
This problem is not unique to JavaScript/TypeScript. You'll have this problem anytime you're working with unknown data.

Zod also works just fine async.