Giulio Canti

Results 396 comments of Giulio Canti

Could you please send a PR (or show a snippet) so we can reason about the actual changes?

AFAIK there's no reliable way to define a `union` encoder

If I understand correctly in order to extend `t.Type` with your own operations you can use a `class`-based approach ```ts import * as t from 'io-ts' class Table extends t.Type...

> D.refine()'s input function can either return a boolean as it does now, or perhaps can also return D.failure() outputs as well. It doesn't symply return a `boolean`, it returns...

Personally I'd first define some re-utilizable decoder constructors (which could end up in a library like [`io-ts-types`](https://github.com/gcanti/io-ts-types) when the experimental APIs are stable) ```ts import { pipe } from 'fp-ts/lib/pipeable'...

@mlegenhausen you can extend the base `Decoder` interface ```ts interface MaxDecoder extends D.Decoder { readonly max: N } const max = (max: N): MaxDecoder => ({ ...D.fromRefinement((s: string): s is...

> Is there a (working) library that can generate io-ts definitions from typescript code? @HoldYourWaffle not that I'm aware of > As far as I know this shouldn't be much...

> that cover the most common use cases for creating schemas Yeah, that's the rationale behind the current `Schemable` interface :+1: I'm not against a fine grained set of interfaces,...