Giulio Canti
                                            Giulio Canti
                                        
                                    > Can I create this type as a pull request to this library? No, unless there are type safety concerns (that's why I asked *why*, I understand *what* you want...
I can't repro with `[email protected]` or `[email protected]` ```ts import * as t from 'io-ts' import { PathReporter } from 'io-ts/lib/PathReporter' const C = t.union([ t.type({ type: t.literal('A'), foo: t.number }),...
I kind of like a sum type that retains as much meta info as possible. I guess that having such specialized members should make easier to write smarter reporters.
btw I wrote some POCs in the `v2` branch that can be backported once the new error model has beed settled. For example [here's a POC](https://github.com/gcanti/io-ts/blob/80861e690a9ec94e2165408faea38b1330a8550a/src/toDecodeError.ts) of a `toDecodeError` helper...
@mmkal if I understand correctly you are proposing to make `DecodeError` polymorphic (`DecodeError`), how would you rewrite the model in my first comment? About the `HttpResponse` use case, I'm not...
@mmkal this conditional type looks problematic ```ts export type DecodeError = | Leaf | I extends Array ? IndexedProduct // suitable for product types indexed by integers : LabeledProduct //...
@ggoodman the new experimental APIs produce human-understandable error messages by default ```ts import * as E from 'fp-ts/lib/Either' import * as D from 'io-ts/lib/Decoder' import { draw } from 'io-ts/lib/Tree'...
@camsjams I wouldn't recommend using the `Decoder.ts` module in production, it's still experimental and I'm working on a new version (branch `poc` for a sneak peek)
@steida for the error model? yes. I'll write a summary of my findings in #453 as soon as possible
> Not sure if there is an easy way to get the type of the value in the Right that will result from a successful decode - but if there...