From f55bb93a3fbbda006c0d25764246c95804e77acd Mon Sep 17 00:00:00 2001 From: Yuta Osawa Date: Mon, 24 Mar 2025 20:08:55 +0900 Subject: [PATCH] docs: update README to reflect renamed function --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index da6209f20..84d5b4eeb 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. | +| `@TransformInstanceToInstance` | `@TransformInstanceToInstance({ 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';