import * as t from 'io-ts' export type JsonPayload = { tag: 'json'; value: A } export const jsonPayloadC = (codecA: t.Type): t.Type> => t.type({ tag: t.literal('json'), value: codecA })