From 549b27add88043c42e1c813514f032897116e98a Mon Sep 17 00:00:00 2001 From: zhaoxu <493734247@qq.com> Date: Sat, 19 Jun 2021 11:04:06 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=20=E7=BC=BA=E6=BC=8F?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/map/declare/map-tools.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/modules/map/declare/map-tools.ts diff --git a/src/modules/map/declare/map-tools.ts b/src/modules/map/declare/map-tools.ts new file mode 100644 index 0000000..6cf9152 --- /dev/null +++ b/src/modules/map/declare/map-tools.ts @@ -0,0 +1,11 @@ + +export default class MapTools { + public static InstanceConvert(obj: any): any { + var propNames = Object.getOwnPropertyNames(obj.prototype); + for (var name in propNames) { + if (obj[name].discriminator === "ISelf") { + obj[name] = obj[name].self; + } + } + } +} \ No newline at end of file