github.com/gcanti/io-ts ↗
Runtime type system for IO decoding/encoding
Open this visualization on its own page →
Contributors
31
Lines of Code
2,952
From
2017-01-28
To
2021-02-14
About gcanti/io-ts
io-ts is a runtime type system for TypeScript that enables decoding and encoding of data with full type safety. It allows developers to define types that exist at runtime, solving the problem that TypeScript's type system is erased during compilation. The library leverages functional programming patterns and works as a peer dependency with fp-ts.
The project provides a stable set of features for basic runtime type validation and an expanding set of experimental modules introduced in version 2.2 and beyond. The experimental features include dedicated modules for decoding, encoding, codecs, equality checking, and advanced schema validation. These experimental modules are independent from the stable API and may change without notice as the community provides feedback on their design.
io-ts is particularly valuable for scenarios involving external data validation, API responses, configuration files, and any situation where you need to verify that data conforms to an expected structure at runtime. The library is designed for developers building type-safe applications in TypeScript who want guarantees about data validity beyond what compile-time checking alone can provide.