A lot of projects use JSON schemas for runtime data validation along with TypeScript for static type checking.
Features
- The FromSchema method lets you infer TS types directly from JSON schemas
- Schemas can even be nested, as long as you don't forget the as const statement
- The as const statement is used so that TypeScript takes the schema definition to the word
- Since TS 4.9, you can also use the satisfies operator to benefit from type-checking and autocompletion
- Combine schemas
- FromSchema will correctly infer factored schemas
Categories
JSONLicense
MIT LicenseFollow JSON Schema to TS
Other Useful Business Software
MongoDB Atlas runs apps anywhere
MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Rate This Project
Login To Rate This Project
User Reviews
Be the first to post a review of JSON Schema to TS!