rehanvdm / ajv-standalone-type-saftey Goto Github PK
View Code? Open in Web Editor NEWTypeScript does a great job at compile time type safety, but we still need to do runtime checks just like in JavaScript. There are many packages and tools to help with this, we focused on AJV Standalone that outputs JS validation functions at compile time to be used at runtime. Going from TS Types to JSON Schema to JS functions allows us to validate TS Types where the other packages all work with classes and reflection.
Home Page: https://www.rehanvdm.com/blog/typescript-type-safety-with-ajv-standalone