@osdiab/io-ts-types
TypeScript icon, indicating that this package has built-in type declarations

0.6.2 • Public • Published

A collection of runtime types and combinators for use with io-ts

Installation

To install the stable version:

npm i io-ts-types

Note. io-ts-types depends on

starting from 0.5.0 you must install fp-ts, io-ts and monocle-ts manually (fp-ts, io-ts and monocle-ts are listed in peerDependency)

Usage

Import specific codecs and combinators directly from the lib folder, as in:

import { NonEmptyString } from "io-ts-types/lib/NonEmptyString"

In this way, you'll only need to add the monocle-ts dependency if you import any of the combinators depending on it, like getLenses

TypeScript compatibility

The stable version is tested against TypeScript 3.2.2, but should run with TypeScript 3.0.1+ too

Note. If you are running < typescript@3.0.1 you have to polyfill unknown.

You can use unknown-ts as a polyfill.

Documentation

/@osdiab/io-ts-types/

    Package Sidebar

    Install

    npm i @osdiab/io-ts-types

    Weekly Downloads

    30

    Version

    0.6.2

    License

    MIT

    Unpacked Size

    107 kB

    Total Files

    138

    Last publish

    Collaborators

    • osdiab