Function: structuredClone()
ts
function structuredClone<T>(value, options?): T;Defined in: types/desktop-engine.d.ts:5059
A deep copy, as in browsers: objects and arrays (own enumerable properties; an instance of a class becomes a plain object), Date, RegExp, Map, Set, ArrayBuffer and its views, Blob, File, ImageData, errors, DOMException and boxed primitives, keeping cycles and shared references. Functions, symbols, promises, WeakMap and WeakSet, and the engine's objects (canvases, windows, URL, Headers, streams, audio nodes…) throw a "DataCloneError" DOMException (API 5)
Type Parameters
| Type Parameter | Default type |
|---|---|
T | any |
Parameters
| Parameter | Type |
|---|---|
value | T |
options? | StructuredSerializeOptions |
Returns
T
