A strongly-typed runtime validation library for TypeScript that generates accurate interfaces and supports data transformation.
Computed Types is a runtime validation library for TypeScript that allows developers to define schemas using function interfaces, which automatically generate accurate TypeScript types. It validates and transforms data at runtime while providing compile-time type safety, reducing duplication and catching errors early. The library supports both synchronous and asynchronous validation, along with data transformation and chaining of validators.
TypeScript developers who need runtime validation with strong type safety, especially those working on APIs, form validation, or data processing where schema validation is critical.
Developers choose Computed Types for its seamless TypeScript integration, automatic interface generation, and zero-dependency design, offering a more type-safe and readable alternative to traditional validation libraries like Joi.
🦩 Joi like validations for TypeScript
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Automatically generates accurate TypeScript interfaces from validation schemas, eliminating duplication and catching errors at compile time, as shown in the UserSchema example.
Supports chaining multiple validators with helpers like .equals(), .test(), and .transform(), enabling complex type creation and data normalization in a single step.
Lightweight and compact with no external dependencies, making it easy to integrate and bundle without bloat, as highlighted in the main features.
Automatically detects and handles promises for async validation scenarios, such as checking username availability via API, without additional configuration.
Requires custom validators for common checks like email validation, using external libraries or manual implementation, as demonstrated in the Email function example.
Function-based interfaces and chaining methods can be less intuitive than declarative schemas, especially for developers new to this paradigm.
Has fewer third-party plugins, integrations, and community resources compared to established alternatives like Joi or Zod, which may limit tooling support.
computed_types is an open-source alternative to the following products: