From aa24c0e2639a8d2a7bab772528b4cf7cdd2c375c Mon Sep 17 00:00:00 2001 From: DongHyun Kim Date: Tue, 13 Feb 2024 01:13:58 +0900 Subject: [PATCH] Remove wrong explanation and format guide code --- README.md | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 290c62668..3649fd597 100644 --- a/README.md +++ b/README.md @@ -216,7 +216,7 @@ const fromPlainUser = { }; console.log( - plainToInstance(User, fromPlainUser, { excludeExtraneousValues: true }), + plainToInstance(User, fromPlainUser, { excludeExtraneousValues: true }) ); // User { @@ -580,25 +580,6 @@ export class Photo { Library will handle proper transformation automatically. -ES6 collections `Set` and `Map` also require the `@nested` decorator: - -```typescript -export class Skill { - name: string; -} - -export class Weapon { - name: string; - range: number; -} - -export class Player { - name: string; - @nested(Skill) skills: Set; - @nested(Weapon) weapons: Map; -} -``` - ## Additional data transformation(#table-of-contents) ### Basic usage(#table-of-contents) @@ -665,12 +646,12 @@ class MyPayload { const result1 = plainToInstance( MyPayload, { prop: 1234 }, - { enableImplicitConversion: true }, + { enableImplicitConversion: true } ); const result2 = plainToInstance( MyPayload, { prop: 1234 }, - { enableImplicitConversion: false }, + { enableImplicitConversion: false } ); /**