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

Function getFullyQualifiedModuleName

test/fixtures/snapshot/typescript.js:141498–141506  ·  view source on GitHub ↗
(moduleDeclaration)

Source from the content-addressed store, hash-verified

141496 return getFullyQualifiedModuleName(moduleDeclaration);
141497 }
141498 function getFullyQualifiedModuleName(moduleDeclaration) {
141499 // Otherwise, we need to aggregate each identifier to build up the qualified name.
141500 var result = [ts.getTextOfIdentifierOrLiteral(moduleDeclaration.name)];
141501 while (moduleDeclaration.body && moduleDeclaration.body.kind === 261 /* SyntaxKind.ModuleDeclaration */) {
141502 moduleDeclaration = moduleDeclaration.body;
141503 result.push(ts.getTextOfIdentifierOrLiteral(moduleDeclaration.name));
141504 }
141505 return result.join(".");
141506 }
141507 /**
141508 * For 'module A.B.C', we want to get the node for 'C'.
141509 * We store 'A' as associated with a NavNode, and use getModuleName to traverse down again.

Callers 2

shouldReallyMergeFunction · 0.85
getModuleNameFunction · 0.85

Calls 2

pushMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected