Giulio Canti

Results 398 comments of Giulio Canti

> it doesn't mean to be complete However how I'm handling `maybe` is not good, so I amended the example in GUIDE.md

@marwanhilmi not that I'm aware. May I ask you what's your use case?

Yes I do (as soon as I understand how to use the new `bigint` type [introduced in TypeScript 3.2](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-2.html))

This is weird, with `NODE_ENV=production` you shouldn't see any error message at all > Object.freeze calls **and asserts** are executed only in development and stripped out in production (using process.env.NODE_ENV...

mhh I think you hit a corner case, an implicit assumption is that you shouldn't use `t.maybe(t.Any)` nor `t.maybe(t.Nil)` because ``` t.maybe(t.Any) = t.Any // and t.maybe(t.Nil) = t.Nil ```...

@OliverJAsh looks like `io-ts` detects `Union` as a tagged union (being "premium" the tag) and executes this path https://github.com/gcanti/io-ts/blob/63eea029773595b6a9cff9d70894935ae7a20e7e/src/index.ts#L1598 since `{}['premium']` is `undefined`, so it returns early without giving `withFallback`...

what about ```ts const Nullable = t.union([t.null, t.undefined]) const Enum = fallback(t.keyof({ foo: null }))('foo') const NullableWithEnum = t.partial({ val: t.union([Nullable, Enum]) }) console.log(NullableWithEnum.decode({})) // right({}) console.log(NullableWithEnum.decode({ val: 'foo' }))...

> are you waiting to see if stuff settles? Yep

@kpritam I would return the original input ```ts import * as E from 'fp-ts/lib/Either' import { flow } from 'fp-ts/lib/function' import * as D from 'io-ts/lib/Decoder' const decoder: D.Decoder =...

> all the following cases should pass and all should return Hcd Ah ok, I misinterpreted the requirements, I thought you always wanted the original input back