forked from github/fast-deep-copy
11 lines
337 B
TypeScript
11 lines
337 B
TypeScript
|
/**
|
||
|
* 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;
|