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

Function isImportRequiredByAugmentation

test/fixtures/snapshot/typescript.js:87355–87381  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

87353 isImportRequiredByAugmentation: isImportRequiredByAugmentation,
87354 };
87355 function isImportRequiredByAugmentation(node) {
87356 var file = ts.getSourceFileOfNode(node);
87357 if (!file.symbol)
87358 return false;
87359 var importTarget = getExternalModuleFileFromDeclaration(node);
87360 if (!importTarget)
87361 return false;
87362 if (importTarget === file)
87363 return false;
87364 var exports = getExportsOfModule(file.symbol);
87365 for (var _i = 0, _a = ts.arrayFrom(exports.values()); _i < _a.length; _i++) {
87366 var s = _a[_i];
87367 if (s.mergeId) {
87368 var merged = getMergedSymbol(s);
87369 if (merged.declarations) {
87370 for (var _b = 0, _c = merged.declarations; _b < _c.length; _b++) {
87371 var d = _c[_b];
87372 var declFile = ts.getSourceFileOfNode(d);
87373 if (declFile === importTarget) {
87374 return true;
87375 }
87376 }
87377 }
87378 }
87379 }
87380 return false;
87381 }
87382 function isInHeritageClause(node) {
87383 return node.parent && node.parent.kind === 228 /* SyntaxKind.ExpressionWithTypeArguments */ && node.parent.parent && node.parent.parent.kind === 291 /* SyntaxKind.HeritageClause */;
87384 }

Callers

nothing calls this directly

Calls 4

getExportsOfModuleFunction · 0.85
getMergedSymbolFunction · 0.85
valuesMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…