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

Function getExternalModuleFileFromDeclaration

test/fixtures/snapshot/typescript.js:87470–87477  ·  view source on GitHub ↗
(declaration)

Source from the content-addressed store, hash-verified

87468 }
87469 }
87470 function getExternalModuleFileFromDeclaration(declaration) {
87471 var specifier = declaration.kind === 261 /* SyntaxKind.ModuleDeclaration */ ? ts.tryCast(declaration.name, ts.isStringLiteral) : ts.getExternalModuleName(declaration);
87472 var moduleSymbol = resolveExternalModuleNameWorker(specifier, specifier, /*moduleNotFoundError*/ undefined); // TODO: GH#18217
87473 if (!moduleSymbol) {
87474 return undefined;
87475 }
87476 return ts.getDeclarationOfKind(moduleSymbol, 305 /* SyntaxKind.SourceFile */);
87477 }
87478 function initializeTypeChecker() {
87479 // Bind all source files and propagate errors
87480 for (var _i = 0, _a = host.getSourceFiles(); _i < _a.length; _i++) {

Callers 3

rewriteModuleSpecifierFunction · 0.85
createResolverFunction · 0.85

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…