runtypes/runtypes
Runtime validation for static types observed · 2026-08-28
Health v2 · maintenance only
98/100
- Activity 97
- Release rhythm 98
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 5
- age_days: 3758
- days_rel: 19
- days_push: 19
- n_releases_24m: 6
Adoption not part of the score
2697 stars · 91 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
Runtypes is a TypeScript library for runtime validation of data against static types using composable validators for primitives, objects, arrays, tuples, unions, and more. It lets you safely check untyped external data (e.g., JSON) conforms to a type and derive static TypeScript types from the validators.
Use cases
- validate JSON payloads from an API at runtime
- parse untrusted external data into typed TypeScript objects
- validate config files loaded at startup
- check data conforms to a discriminated union of object shapes
- derive static TypeScript types from runtime validators
- validate user input before processing
When to choose
- you use TypeScript and want runtime checks that mirror your static types
- you want composable validators with detailed validation errors
- you prefer a lightweight validation library with a functional API
When to avoid
- you need schema-based code generation or JSON Schema output
- you need high-performance validation of very large data volumes
- your project is not TypeScript/JavaScript
Facets
library · maturity stable
serialization developer-tools developer-tools web-development apis bun cross-platform typescript runtime-validation type-safety schema-validation data-validation nodejs deno
2 sources
- readme: https://github.com/runtypes/runtypes · fetched 2026-08-28 · 4023ec8d50e9
- registry_npm: https://registry.npmjs.org/runtypes · fetched 2026-08-29 · 8777fc94d3da
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| runtypes/runtypes | main | 98 |
For agents
markdown · JSON · MCP: product_card(name="runtypes/runtypes")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem