MCPcopy Create free account
hub / github.com/nodejs/node / getIndirectUsers

Function getIndirectUsers

test/fixtures/snapshot/typescript.js:136231–136247  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

136229 handleDirectImports(exportingModuleSymbol);
136230 return { directImports: directImports, indirectUsers: getIndirectUsers() };
136231 function getIndirectUsers() {
136232 if (isAvailableThroughGlobal) {
136233 // It has `export as namespace`, so anything could potentially use it.
136234 return sourceFiles;
136235 }
136236 // Module augmentations may use this module's exports without importing it.
136237 if (exportingModuleSymbol.declarations) {
136238 for (var _i = 0, _a = exportingModuleSymbol.declarations; _i < _a.length; _i++) {
136239 var decl = _a[_i];
136240 if (ts.isExternalModuleAugmentation(decl) && sourceFilesSet.has(decl.getSourceFile().fileName)) {
136241 addIndirectUser(decl);
136242 }
136243 }
136244 }
136245 // This may return duplicates (if there are multiple module declarations in a single source file, all importing the same thing as a namespace), but `State.markSearchedSymbol` will handle that.
136246 return indirectUserDeclarations.map(ts.getSourceFileOfNode);
136247 }
136248 function handleDirectImports(exportingModuleSymbol) {
136249 var theseDirectImports = getDirectImports(exportingModuleSymbol);
136250 if (theseDirectImports) {

Callers 1

getImportersForExportFunction · 0.85

Calls 3

addIndirectUserFunction · 0.85
hasMethod · 0.65
mapMethod · 0.65

Tested by

no test coverage detected