aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/SerializationHelper.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/util/SerializationHelper.ts')
-rw-r--r--src/client/util/SerializationHelper.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/util/SerializationHelper.ts b/src/client/util/SerializationHelper.ts
index fa1a911f7..d9d22437c 100644
--- a/src/client/util/SerializationHelper.ts
+++ b/src/client/util/SerializationHelper.ts
@@ -65,7 +65,7 @@ export namespace SerializationHelper {
}
}
-export function Deserializable(className: string, afterDeserialize?: (obj: any) => void | Promise<any>, constructorArgs?: [string]): (constructor: { new (...args: any[]): any }) => void {
+export function Deserializable(classNameForSerializer: string, afterDeserialize?: (obj: any) => void | Promise<any>, constructorArgs?: [string]): (constructor: { new (...args: any[]): any }) => void {
function addToMap(className: string, Ctor: { new (...args: any[]): any }) {
const schema = getDefaultModelSchema(Ctor) as any;
if (schema.targetClass !== Ctor || constructorArgs) {
@@ -78,7 +78,7 @@ export function Deserializable(className: string, afterDeserialize?: (obj: any)
throw new Error(`Name ${className} has already been registered as deserializable`);
}
}
- return (ctor: { new (...args: any[]): any }) => addToMap(className, ctor);
+ return (ctor: { new (...args: any[]): any }) => addToMap(classNameForSerializer, ctor);
}
export function autoObject(): PropSchema {