core.deepclone | Medplum
deepClone() function
Creates a deep clone of the input value.
Limitations:
- Only supports JSON primitives and arrays.
- Does not support Functions, lambdas, etc.
- Does not support circular references.
See: https://web.dev/structured-clone/ See: https://stackoverflow.com/questions/40488190/how-is-structured-clone-algorithm-different-from-deep-copy
Signature:
export declare function deepClone<T>(input: T): T;
Parameters [](/content/docs/sdk/core.deepclone#parameters "Direct link to Parameters"/index.html)
| Parameter | Type | Description |
|---|---|---|
| input | T | The input to clone. |
Returns:
T
A deep clone of the input.