Actio
API ReferenceFunctions

cloneNode

function cloneNode<T>(ctx, node): T;

Defined in: packages/core/src/ir.ts:118

Deep-clone a node, carrying its origin onto the copy. structuredClone drops the external WeakMap entry, so we copy it explicitly — this is what keeps provenance pointing at the source through fan-out (e.g. retry attempts).

Type Parameters

T

T extends object

Parameters

ctx

ParseContext

node

T

Returns

T

On this page