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

Function getNodeForGeneratedName

test/fixtures/snapshot/typescript.js:114678–114695  ·  view source on GitHub ↗

* Gets the node from which a name should be generated.

(name)

Source from the content-addressed store, hash-verified

114676 * Gets the node from which a name should be generated.
114677 */
114678 function getNodeForGeneratedName(name) {
114679 var autoGenerateId = name.autoGenerateId;
114680 var node = name;
114681 var original = node.original;
114682 while (original) {
114683 node = original;
114684 // if "node" is a different generated name (having a different
114685 // "autoGenerateId"), use it and stop traversing.
114686 if (ts.isIdentifier(node)
114687 && !!(node.autoGenerateFlags & 4 /* GeneratedIdentifierFlags.Node */)
114688 && node.autoGenerateId !== autoGenerateId) {
114689 break;
114690 }
114691 original = node.original;
114692 }
114693 // otherwise, return the original node for the source;
114694 return node;
114695 }
114696 // Comments
114697 function pipelineEmitWithComments(hint, node) {
114698 var pipelinePhase = getNextPipelinePhase(2 /* PipelinePhase.Comments */, hint, node);

Callers 1

generateNameFunction · 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…