JSON Schema === Runtime Type System for TypeScript

This page summarizes the projects mentioned and recommended in the original post on /r/typescript

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • typebox

    Json Schema Type Builder with Static Type Resolution for TypeScript

  • zod

    TypeScript-first schema validation with static type inference

  • This is cool — how does it compare to zod? https://github.com/colinhacks/zod

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • schema-builder

    A typescript JSON Schema library that creates a schema and its type at the same time

  • Similar to https://github.com/serafin-labs/schema-builder

  • Paste JSON as Code • quicktype

    Xcode extension to paste JSON as Swift, Objective-C, and more

  • https://quicktype.io/ might be a solution for that.

  • typescript-is

  • typescript-is. This uses a compile-time transformer to generate code for type-checking. You'll need to use ttypescript instead of typescript to compile your code (I recommend setting this up with ts-patch). It won't work if your build pipeline is actually using something like esbuild or Babel to transpile TS->JS.

  • class-validator

    Decorator-based property validation for classes.

  • class-validator + class-transformer. Your build pipeline needs to support the TC39 decorators proposal (the TypeScript compiler has this built-in).

  • class-transformer

    Decorator-based transformation, serialization, and deserialization between objects and classes.

  • class-validator + class-transformer. Your build pipeline needs to support the TC39 decorators proposal (the TypeScript compiler has this built-in).

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • openapi-typescript-validator

    Generate typescript with ajv validation based on openapi schemas

  • Take a look at this repo for an example of how to do that: https://github.com/Q42/openapi-typescript-validator

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts