This PR adds indexed output types to the option and either codecs. This solves the problem that it is currently not possible to do Json.pipe(option(t.unknown)) or Json.pipe(either(t.string, t.unknown)) as the fp-ts types can not be assigned to JsonRecord. As we don't want to loose the interface representation in fp-ts it is the best to add an indexed version to io-ts-types.
This PR adds indexed output types to the
option
andeither
codecs. This solves the problem that it is currently not possible to doJson.pipe(option(t.unknown))
orJson.pipe(either(t.string, t.unknown))
as thefp-ts
types can not be assigned toJsonRecord
. As we don't want to loose theinterface
representation infp-ts
it is the best to add an indexed version toio-ts-types
.This is related to https://github.com/gcanti/fp-ts/issues/1734