deepClone
@tsed/core
Usage
typescript
import { deepClone } from "@tsed/core";Overview
ts
const deepClone: (source: any, stack?: WeakMap<WeakKey, any>) => any;Description
Creates a deep clone of the provided value, preserving prototype chains and handling circular references.
Supports primitives, dates, regular expressions, typed arrays, buffers, maps, sets, and plain objects. Uses a WeakMap to track and handle circular references correctly.