Is there a way to change the Codec of a single property in an object without having to redefine everything else? For example, let's say I have a struct with a date field that sometimes receives input as a timestamp and other times as an ISO string depending on third-party API calls.
import * as COD from "io-ts/Codec";
const TimestampDateCodec: COD.Codec<unknown, number, Date> = {};
const IsoStringDateCodec: COD.Codec<unknown, string, Date> = {};
const current = COD.struct({
id: COD.string,
// a lot of other props...
someDate: TimestampDateCodec, // I want to switch this to IsoStringDateCodec without redefining the whole struct
});