import { ClassConstructor } from '../util'; /** * A serializer that's use to serialize/deserialize objects as they leave and enter the application boundary. */ export interface Serializer { serialize(obj: T): string; deserialize(val: string, classType: ClassConstructor): T; toPlain(obj: T): object; toClass(obj: object, classConstructor: ClassConstructor): T; }