This commit is contained in:
zlh
2017-09-23 15:26:41 +08:00
parent 036a7c8470
commit 25e19bbf04
7 changed files with 49 additions and 21 deletions
+12
View File
@@ -0,0 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var deep_copy_1 = require("./deep-copy");
var a = { dataA: 10, b: null };
var b = { dataB: 20, a: null };
a.b = b;
b.a = a;
var newA = deep_copy_1.deepCopy(a);
console.log(newA.dataA === 10); //true
console.log(newA.b.dataB === 20); //true
console.log(newA.b.a === newA); //true
//# sourceMappingURL=test.js.map