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

Function tryGetQualifiedNameAsValue

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

Source from the content-addressed store, hash-verified

50966 return node;
50967 }
50968 function tryGetQualifiedNameAsValue(node) {
50969 var left = ts.getFirstIdentifier(node);
50970 var symbol = resolveName(left, left.escapedText, 111551 /* SymbolFlags.Value */, undefined, left, /*isUse*/ true);
50971 if (!symbol) {
50972 return undefined;
50973 }
50974 while (ts.isQualifiedName(left.parent)) {
50975 var type = getTypeOfSymbol(symbol);
50976 symbol = getPropertyOfType(type, left.parent.right.escapedText);
50977 if (!symbol) {
50978 return undefined;
50979 }
50980 left = left.parent;
50981 }
50982 return symbol;
50983 }
50984 /**
50985 * Resolves a qualified name and any involved aliases.
50986 */

Callers 1

resolveEntityNameFunction · 0.85

Calls 3

resolveNameFunction · 0.85
getTypeOfSymbolFunction · 0.85
getPropertyOfTypeFunction · 0.85

Tested by

no test coverage detected