fast-deep-copy-ts/dist/deep-copy.d.ts

11 lines
337 B
TypeScript
Raw Normal View History

2022-12-02 10:23:04 +08:00
/**
* Deep copy the given object considering circular structure.
* This function caches all nested objects and its copies.
* If it detects circular structure, use cached copy to avoid infinite loop.
*
* @param {*} obj
* @param {Array<Object>} cache
* @return {*}
*/
export declare function deepCopy<T>(obj: T, cache?: any[]): T;