Move cloneObject into utilities and export it.

This commit is contained in:
Remco Vermeulen 2024-07-31 17:56:06 -07:00
parent 19a1da54d1
commit 7be3a64c02
6 changed files with 12 additions and 11 deletions

View file

@ -1100,3 +1100,7 @@ export enum BuildMode {
/** The database will be created by building the source root using manually specified build steps. */
Manual = "manual",
}
export function cloneObject<T>(obj: T): T {
return JSON.parse(JSON.stringify(obj)) as T;
}