TypeScript Library
6.6k 2026-04-18

sinclairzx81/typebox

TypeBox is a TypeScript library that provides a runtime type system for building JSON Schema objects with static type resolution, enabling unified type checking and runtime data validation.

Core Features

Programmatically build JSON Schema objects.
Infer static TypeScript types from JSON Schemas.
Perform runtime data validation using standard JSON Schema.
Enable composable and reusable type definitions.
Integrate with REST, RPC, and MCP services for data validation.

Quick Start

npm install typebox

Detailed Introduction

TypeBox is a runtime type system for TypeScript that bridges the gap between static type checking and runtime data validation. It allows developers to define types using a fluent API, which then generate standard JSON Schema objects. Crucially, these generated schemas can also infer precise TypeScript types, ensuring consistency across compile-time and runtime. This unified approach simplifies data validation, especially for data received over networks in services like REST or RPC, by leveraging the robustness of JSON Schema while maintaining TypeScript's type safety.

OSS Alternative

Explore the best open source alternatives to commercial software.

© 2026 OSS Alternative. hotgithub.com - All rights reserved.