From e104b0a3867179a274686f08837ef701ecf1a1a6 Mon Sep 17 00:00:00 2001 From: Rishabh Sethi Date: Mon, 23 Dec 2024 00:13:50 +0530 Subject: [PATCH] docs: Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index da6209f20..652af8154 100644 --- a/README.md +++ b/README.md @@ -787,9 +787,9 @@ The `@Transform` decorator is given more arguments to let you configure how you | Signature | Example | Description | | ------------------------ | ---------------------------------------------------- | ------------------------------------------------------------------------------------- | -| `@TransformClassToPlain` | `@TransformClassToPlain({ groups: ["user"] })` | Transform the method return with instanceToPlain and expose the properties on the class. | -| `@TransformClassToClass` | `@TransformClassToClass({ groups: ["user"] })` | Transform the method return with instanceToInstance and expose the properties on the class. | -| `@TransformPlainToClass` | `@TransformPlainToClass(User, { groups: ["user"] })` | Transform the method return with plainToInstance and expose the properties on the class. | +| `@TransformInstanceToPlain` | `@TransformInstanceToPlain({ groups: ["user"] })` | Transform the method return with instanceToPlain and expose the properties on the class. | +| `@TransformInstanceToInstancen` | `@TransformInstanceToInstancen({ groups: ["user"] })` | Transform the method return with instanceToInstance and expose the properties on the class. | +| `@TransformPlainToInstance` | `@TransformPlainToInstance(User, { groups: ["user"] })` | Transform the method return with plainToInstance and expose the properties on the class. | The above decorators accept one optional argument: ClassTransformOptions - The transform options like groups, version, name @@ -814,7 +814,7 @@ class User { } class UserController { - @TransformClassToPlain({ groups: ['user.email'] }) + @TransformInstanceToPlain({ groups: ['user.email'] }) getUser() { const user = new User(); user.firstName = 'Snir';