Skip to content

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 ParameterDefault type
Tany

Parameters ​

ParameterType
valueT
options?StructuredSerializeOptions

Returns ​

T

The SDK is released under the Apache License 2.0