Back to discussionComment by smichel17[-]smichel176 years ago1 reply#This is why you need input validation. Eg, zod or io-ts.[-]cjdell6 years ago1 reply#Did not know about these. I wrote my own a while back because I couldn't find an example of this being done (fully type safe validation).https://github.com/cjdell/type-safe-validatorbuu7006 years ago#Not exactly the same thing, but protobuf.js also works really well for this: https://github.com/protobufjs/protobuf.js
cjdell6 years ago1 reply#Did not know about these. I wrote my own a while back because I couldn't find an example of this being done (fully type safe validation).https://github.com/cjdell/type-safe-validator
buu7006 years ago#Not exactly the same thing, but protobuf.js also works really well for this: https://github.com/protobufjs/protobuf.js
https://github.com/cjdell/type-safe-validator