• Remarks

    深copy 只对Oject/Array,其他数据直接返回进行处理

    Example

    使用例子,比如copy一个obj对象:

      const obj = { name: 'test', point: { x: 110, y: 120 } }   
    const newObj = deepClone(obj)

    Type Parameters

    • T extends SomeConstructor

      the identity type

    Parameters

    • target: T

      需要深copy的对象

    • hash: WeakMap<object, any> = ...

    Returns T