Open
Description
Say I have the following class definition:
export class Filter {
@IsEnum(FilterType)
id: FilterType
@IsString()
/* This is not getting executed. **/
@Transform(({ obj }) => LabelGenerator.getfilterTypeLabel(obj.id), { toClassOnly: true })
label: string;
@IsEnum(FilterSelectType)
select: FilterSelectType;
}
I am using a plain object: {id: 'Sample', select: 'multi'}
to create the class.
In the above case, @Transform decorator is not getting executed, but if I put @expose() decorator on top of that, it works as expected. Is this the expected behavior?