global.structuredClone
Deep copy with cycles; functions and symbols throw a DataCloneError. No transfer.
Utilização
Copy plain application data before editing a draft.
// Copy plain application data before editing a draft.
const saved = { title: 'Packing list', items: ['Passport'] };
const draft = structuredClone(saved);
draft.items.push('Tickets');
console.log(saved.items.length, draft.items.length); // 1, 2Assinaturas
<T>(value: T): TParâmetros de tipo
| Nome | Restrição | Predefinição |
|---|---|---|
T | — | — |
Parâmetros
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
value | T | Sim | — |
Devolve
T
Gerado a partir das declarações TypeScript públicas: assinaturas, props e predefinições vêm da fonte verificada, as descrições da sua JSDoc. Nenhuma predefinição é inventada.