class-transformer icon indicating copy to clipboard operation
class-transformer copied to clipboard

question: Is it possible to rename property when I use @Transform

Open ymolchaniuk opened this issue 3 years ago • 0 comments

I wan't to rename property when it will be returned to client, for example I have export class A { @Transform(({value})=>4) t: string; } I need to rename t when it will be converted to json and recieve: { b: 4 }

ymolchaniuk avatar Aug 13 '22 12:08 ymolchaniuk