diginext-utils
Version:
README.md
18 lines • 508 B
TypeScript
/**
* Creates a deep clone of an object, array, or primitive value.
* Handles nested objects and arrays recursively.
*
* @template T - The type of value to clone
* @param value - The value to clone
* @returns A deep clone of the value
*
* @example
* ```ts
* const obj = { a: 1, b: { c: 2 } };
* const cloned = deepClone(obj);
* cloned.b.c = 3;
* console.log(obj.b.c); // 2 (original unchanged)
* ```
*/
export declare function deepClone<T>(value: T): T;
//# sourceMappingURL=deepClone.d.ts.map