First part of a huge refactoring

This commit is contained in:
Pieter Vander Vennet 2021-12-21 18:35:31 +01:00
parent 0c22b15c8d
commit 11150a258d
56 changed files with 1425 additions and 1324 deletions

View file

@ -191,7 +191,7 @@ In the case that MapComplete is pointed to the testing grounds, the edit will be
return newArr;
}
public static Dupicates(arr: string[]): string[] {
public static Dupiclates(arr: string[]): string[] {
if (arr === undefined) {
return undefined;
}
@ -618,5 +618,17 @@ In the case that MapComplete is pointed to the testing grounds, the edit will be
b: parseInt(hex.substr(5, 2), 16),
}
}
/**
* Deepclone an object by serializing and deserializing it
* @param x
* @constructor
*/
static Clone<T>(x: T): T {
if(x === undefined){
return undefined;
}
return JSON.parse(JSON.stringify(x));
}
}