This commit is contained in:
Jaco Greeff
2019-08-29 16:21:26 +02:00
committed by GitHub
parent 14100d319d
commit 417a9ffceb
5 changed files with 108 additions and 84 deletions
+2 -2
View File
@@ -37,9 +37,9 @@ export default class Struct<
public constructor (Types: S, value: V | Map<any, any> | any[] | string = {} as unknown as V, jsonMap: Map<keyof S, string> = new Map()) {
const Clazzes = mapToTypeMap(Types);
const decoded = Struct.decodeStruct(Clazzes, value, jsonMap);
const decoded: T = Struct.decodeStruct(Clazzes, value, jsonMap);
super(Object.entries(decoded as any));
super(Object.entries(decoded));
this._jsonMap = jsonMap;
this._Types = Clazzes;