# ThomasAribart/json-schema-to-ts

Infer TS types from JSON schemas 📝

Repository: https://github.com/ThomasAribart/json-schema-to-ts
Canonical: https://ross.abutalabs.com/products/json-schema-to-ts
Language: TypeScript
License: MIT
License Family: permissive
Topics: json-schema, typescript, json, type, schema, ts
Last push: 2026-05-09T06:50:51+00:00

## Health v2 (maintenance only)
Score: 59/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 81, release rhythm 8, longevity 100
- inputs: {"age_days": 2241, "days_push": 116, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1778, forks 39 (observed 2026-08-28T04:05:35.216164+00:00)

## What it is
A TypeScript library that statically infers TypeScript types from JSON schemas via a FromSchema type utility, eliminating duplicate type definitions. Schemas written with 'as const' are resolved at compile time into matching TS types.

## Use cases
- infer typescript types from  schemas
- stop duplicating types for runtime validation schemas
- derive types from  schema at compile time
- type  schema objects in typescript
- avoid type drift between schemas and typescript code

## When to choose
- you already validate data with JSON schemas and want matching static types
- you want compile-time type inference without code generation steps
- your schemas are defined in TypeScript source with 'as const'

## When to avoid
- schemas live outside your codebase as separate JSON/YAML files at runtime
- you need runtime validation itself rather than static types
- you prefer codegen pipelines generating .d.ts files

## Facets
- artifact type: library
- maturity: active
- function: type-system, serialization, developer-tools
- domain: developer-tools, web-development, apis
- platform: cross-platform
- tags: -schema, type-inference, typescript-types, compile-time, nodejs, typescript

## Member repositories
- ThomasAribart/json-schema-to-ts (main) score 59

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:35.216164+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:25:09.082989+00:00, confidence not recorded.
  - readme: https://github.com/ThomasAribart/json-schema-to-ts (fetched 2026-08-28T04:05:35.216164+00:00, sha dd1d365d570e)
  - registry_npm: https://registry.npmjs.org/json-schema-to-ts (fetched 2026-08-29T11:03:34.786161+00:00, sha 07345e740659)
- Data as of 2026-08-30T08:39:29.467469+00:00.
