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

Function checkDeprecatedAliasedSymbol

test/fixtures/snapshot/typescript.js:85204–85232  ·  view source on GitHub ↗
(symbol, location)

Source from the content-addressed store, hash-verified

85202 return !!symbol.declarations && ts.every(symbol.declarations, function (d) { return !!(ts.getCombinedNodeFlags(d) & 268435456 /* NodeFlags.Deprecated */); });
85203 }
85204 function checkDeprecatedAliasedSymbol(symbol, location) {
85205 if (!(symbol.flags & 2097152 /* SymbolFlags.Alias */))
85206 return symbol;
85207 var targetSymbol = resolveAlias(symbol);
85208 if (targetSymbol === unknownSymbol)
85209 return targetSymbol;
85210 while (symbol.flags & 2097152 /* SymbolFlags.Alias */) {
85211 var target = getImmediateAliasedSymbol(symbol);
85212 if (target) {
85213 if (target === targetSymbol)
85214 break;
85215 if (target.declarations && ts.length(target.declarations)) {
85216 if (isDeprecatedAliasedSymbol(target)) {
85217 addDeprecatedSuggestion(location, target.declarations, target.escapedName);
85218 break;
85219 }
85220 else {
85221 if (symbol === targetSymbol)
85222 break;
85223 symbol = target;
85224 }
85225 }
85226 }
85227 else {
85228 break;
85229 }
85230 }
85231 return targetSymbol;
85232 }
85233 function checkImportBinding(node) {
85234 checkCollisionsForDeclarationName(node, node.name);
85235 checkAliasSymbol(node);

Callers 2

checkIdentifierFunction · 0.85
checkAliasSymbolFunction · 0.85

Calls 5

resolveAliasFunction · 0.85
addDeprecatedSuggestionFunction · 0.85
lengthMethod · 0.45

Tested by

no test coverage detected