Giulio Canti

Results 396 comments of Giulio Canti

What about a private constructor + a private property? ```ts import * as O from 'fp-ts/Option' class Foo { static smartConstructor(first: string, second: string): O.Option { return first === second...

AFAIK there are possible 2 approaches - convert a runtime type to JSON Schema (either at runtime or compile time) - convert a JSON Schema to a runtime type (either...

> After compiling with tsc the resulting .d.ts files end up having broken declarations @cyberixae looks like a `tsc` bug

`Decoder`, `Encoder` and `Codec` modules are published as experimental in order to get early feedback from the community. `Codec` should largely replace `Type` except for untagged unions (that's because encoders...

> Will untagged unions be supported at all? They are supported in `Decoder`. I can't find a reliable way to support them in `Encoder` though. So either you define an...

@IMax153 @steida the `Json` encoder is just the identity function ```ts import * as C from 'io-ts/lib/Codec' import * as D from 'io-ts/lib/Decoder' import * as E from 'io-ts/lib/Encoder' type...

> maybe there could be a special case for unions of codecs with encode = t.identity @mmkal maybe, but supporting untagged unions means that the implementation of `Schemable`'s `union` ```ts...

> I think it would be useful to include a pipe-like fn anyway, for when you already have two decoders that you want to sequence example? > I wonder what...

> Is this possible with the new D.parse? Yes, but there are many different ways to get the final result so I guess it really depends on your coding style...

@leemhenson @mmkal given the good results in https://github.com/gcanti/io-ts/issues/478 I'm going to make the following breaking changes: - `Decoder` - change `DecoderError` - remove `never` - make `parse` pipeable and change...