Question · NestJS course · Module 10: Data Validation

@Transform Decorator

What is the @Transform() decorator used for in class-transformer?

Answer options

  • Animates the field value change
  • Creates a backup of the value
  • Defines custom transformation logic for the field value
  • Changes the field type in TypeScript

You can check the correct answer by solving this task in the CodeWorlds game.