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

Function needsQualification

test/fixtures/snapshot/typescript.js:51964–51988  ·  view source on GitHub ↗
(symbol, enclosingDeclaration, meaning)

Source from the content-addressed store, hash-verified

51962 }
51963 }
51964 function needsQualification(symbol, enclosingDeclaration, meaning) {
51965 var qualify = false;
51966 forEachSymbolTableInScope(enclosingDeclaration, function (symbolTable) {
51967 // If symbol of this name is not available in the symbol table we are ok
51968 var symbolFromSymbolTable = getMergedSymbol(symbolTable.get(symbol.escapedName));
51969 if (!symbolFromSymbolTable) {
51970 // Continue to the next symbol table
51971 return false;
51972 }
51973 // If the symbol with this name is present it should refer to the symbol
51974 if (symbolFromSymbolTable === symbol) {
51975 // No need to qualify
51976 return true;
51977 }
51978 // Qualify if the symbol from symbol table has same meaning as expected
51979 symbolFromSymbolTable = (symbolFromSymbolTable.flags & 2097152 /* SymbolFlags.Alias */ && !ts.getDeclarationOfKind(symbolFromSymbolTable, 275 /* SyntaxKind.ExportSpecifier */)) ? resolveAlias(symbolFromSymbolTable) : symbolFromSymbolTable;
51980 if (symbolFromSymbolTable.flags & meaning) {
51981 qualify = true;
51982 return true;
51983 }
51984 // Continue to the next symbol table
51985 return false;
51986 });
51987 return qualify;
51988 }
51989 function isPropertyOrMethodDeclarationSymbol(symbol) {
51990 if (symbol.declarations && symbol.declarations.length) {
51991 for (var _i = 0, _a = symbol.declarations; _i < _a.length; _i++) {

Callers 2

canQualifySymbolFunction · 0.85
getSymbolChainFunction · 0.85

Calls 4

getMergedSymbolFunction · 0.85
resolveAliasFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…