import { classToPlain } from "class-transformer" ; import mung from "express-mung" ; import { Application } from "express" ; export function addClassTransformMiddleware ( app ) { app . use ( mung . json ( function transform ( body ) { return classToPlain ( body ) ; } ) ) ; } export class AlreadySentError extends Error { }