/** * @description 深拷贝 * @param { Object } obj 被拷贝的对象 * @return { Object } 返回新的对象 * @example * let a = { * a: 1, * b: 2, * c: 3, * d: [1, 2] * } * let b = deepClone(a) * a.d[0] = 3 * console.log(a) * // a: {a: 1, b: 2, c: 3, d: [3, 2]} * console.log(b) * // b: {a: 1, b: 2, c: 3, d: [1, 2]} * // 此时修改a.d[0]的值, a对象变化了,b对象没有随之改变 */ declare function deepClone(obj: any): any; export default deepClone;