News for hackers. Stuff that matters.
Re:Parse, Don't Validate (2019) by kristiandupont on Tuesday March 07, 2023 @07:57AM (#35054787)
I generally prefer Zod but in cases where I for one reason or another have to rely on JSON Schema, I use this package: https://www.npmjs.com/package/as-typed which infers TS types directly from a such. No extra build steps required. I then use AJV for runtime validation.

There are no comments on this comment yet.