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

Function getModuleNameStringLiteralAt

test/fixtures/snapshot/typescript.js:119527–119542  ·  view source on GitHub ↗
(_a, index)

Source from the content-addressed store, hash-verified

119525 }
119526 /* @internal */
119527 function getModuleNameStringLiteralAt(_a, index) {
119528 var imports = _a.imports, moduleAugmentations = _a.moduleAugmentations;
119529 if (index < imports.length)
119530 return imports[index];
119531 var augIndex = imports.length;
119532 for (var _i = 0, moduleAugmentations_2 = moduleAugmentations; _i < moduleAugmentations_2.length; _i++) {
119533 var aug = moduleAugmentations_2[_i];
119534 if (aug.kind === 10 /* SyntaxKind.StringLiteral */) {
119535 if (index === augIndex)
119536 return aug;
119537 augIndex++;
119538 }
119539 // Do nothing if it's an Identifier; we don't need to do module resolution for `declare global`.
119540 }
119541 ts.Debug.fail("should never ask for module name at index higher than possible module name");
119542 }
119543 ts.getModuleNameStringLiteralAt = getModuleNameStringLiteralAt;
119544})(ts || (ts = {}));
119545/*@internal*/

Callers 2

Calls 1

failMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…