Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://gcanti.github.io/io-ts/

Runtime type system for IO decoding/encoding
https://gcanti.github.io/io-ts/

inference runtime types typescript validation

Last synced: about 2 months ago
JSON representation

Runtime type system for IO decoding/encoding

Awesome Lists containing this project

README

        

[![build status](https://img.shields.io/travis/gcanti/io-ts/master.svg?style=flat-square)](https://travis-ci.org/gcanti/io-ts)
![npm downloads](https://img.shields.io/npm/dm/io-ts.svg)

- [Installation](#installation)
- [Usage](#usage)
- [Stable features](#stable-features)
- [Experimental features (version `2.2+`)](#experimental-features-version-22)

# Installation

To install the stable version

```sh
npm i io-ts fp-ts
```

**Note**. [`fp-ts`](https://github.com/gcanti/fp-ts) is a peer dependency for `io-ts`

# Usage

## Stable features

- [Documentation of the main stable features (`index.ts` module)](index.md)

## Experimental modules (version `2.2+`)

Experimental modules (\*) are published in order to get early feedback from the community, see these tracking [issues](https://github.com/gcanti/io-ts/issues?q=label%3Av2.2+) for further discussions and enhancements.

The experimental modules are **independent and backward-incompatible** with stable ones.

- [`Decoder.ts` module](Decoder.md)
- [`Encoder.ts` module](Encoder.md)
- [`Codec.ts` module](Codec.md)
- [`Eq.ts` module](Eq.md)
- [`Schema.ts` module (advanced feature)](Schema.md)

(\*) A feature tagged as _Experimental_ is in a high state of flux, you're at risk of it changing without notice.