We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e59a441 commit a71aa06Copy full SHA for a71aa06
1 file changed
src/vs/base/common/objects.ts
@@ -26,21 +26,6 @@ export function clone<T>(obj: T): T {
26
return result;
27
}
28
29
-export function deepClone<T>(obj: T): T {
30
- if (!obj || typeof obj !== 'object') {
31
- return obj;
32
- }
33
- const result: any = Array.isArray(obj) ? [] : {};
34
- Object.getOwnPropertyNames(obj).forEach((key: keyof T) => {
35
- if (obj[key] && typeof obj[key] === 'object') {
36
- result[key] = deepClone(obj[key]);
37
- } else {
38
- result[key] = obj[key];
39
40
- });
41
- return result;
42
-}
43
-
44
export function deepFreeze<T>(obj: T): T {
45
if (!obj || typeof obj !== 'object') {
46
return obj;
0 commit comments