Open
Description
class DestinataryVOModel {
@Expose({ name: 'name' })
destinataryName: string
@Expose({ name: 'email' })
destinataryEmail: string
}
class Destinatary {
@Expose({ name: 'id' })
destinataryId: number
@Type(() => DestinataryVOModel)
destinatary: DestinataryVOModel
}
input = {
id: 1,
name: 'any_name',
email: '[email protected]'
}
expectedOutput = {
destinataryId: 1,
destinatary: {
destinataryName: 'any_name'
destinataryEmail: '[email protected]'
}
}
but this doesn't work