export type Encoder = (t: T) => U export interface Converter { encode: Encoder decode: Encoder }