Skip to content

Commit a06e646

Browse files
Merge pull request #1937 from marcjulian/patch-1
docs(serialization): update transform usage
2 parents f036211 + 3f85af8 commit a06e646

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/techniques/serialization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ get fullName(): string {
7474
You can perform additional data transformation using the `@Transform()` decorator. For example, the following construct returns the name property of the `RoleEntity` instead of returning the whole object.
7575

7676
```typescript
77-
@Transform(role => role.name)
77+
@Transform(({ value }) => value.name)
7878
role: RoleEntity;
7979
```
8080

0 commit comments

Comments
 (0)