MCPcopy Index your code
hub / github.com/nodejs/node / deepCloneOrReuseNode

Function deepCloneOrReuseNode

test/fixtures/snapshot/typescript.js:52819–52824  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

52817 }
52818 return result;
52819 function deepCloneOrReuseNode(node) {
52820 if (!ts.nodeIsSynthesized(node) && ts.getParseTreeNode(node) === node) {
52821 return node;
52822 }
52823 return ts.setTextRange(ts.factory.cloneNode(ts.visitEachChild(node, deepCloneOrReuseNode, ts.nullTransformationContext, deepCloneOrReuseNodes)), node);
52824 }
52825 function deepCloneOrReuseNodes(nodes, visitor, test, start, count) {
52826 if (nodes && nodes.length === 0) {
52827 // Ensure we explicitly make a copy of an empty array; visitNodes will not do this unless the array has elements,

Callers 1

visitAndTransformTypeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…