import { LocalDate } from 'js-joda'; /** Function to transform a given type into a string */ export interface Marshaller { (value: T): string } export const StringMarshaller = (value: T) => value.toString(); export const JSONMarshaller = (value: T) => JSON.stringify(value); export const LocalDateMarshaller: Marshaller = (value: LocalDate) => value.toJSON();