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

Function getReferencedValueSymbol

test/fixtures/snapshot/typescript.js:87176–87191  ·  view source on GitHub ↗
(reference, startInDeclarationContainer)

Source from the content-addressed store, hash-verified

87174 return globals.has(ts.escapeLeadingUnderscores(name));
87175 }
87176 function getReferencedValueSymbol(reference, startInDeclarationContainer) {
87177 var resolvedSymbol = getNodeLinks(reference).resolvedSymbol;
87178 if (resolvedSymbol) {
87179 return resolvedSymbol;
87180 }
87181 var location = reference;
87182 if (startInDeclarationContainer) {
87183 // When resolving the name of a declaration as a value, we need to start resolution
87184 // at a point outside of the declaration.
87185 var parent = reference.parent;
87186 if (ts.isDeclaration(parent) && reference === parent.name) {
87187 location = getDeclarationContainer(parent);
87188 }
87189 }
87190 return resolveName(location, reference.escapedText, 111551 /* SymbolFlags.Value */ | 1048576 /* SymbolFlags.ExportValue */ | 2097152 /* SymbolFlags.Alias */, /*nodeNotFoundMessage*/ undefined, /*nameArg*/ undefined, /*isUse*/ true);
87191 }
87192 function getReferencedValueDeclaration(referenceIn) {
87193 if (!ts.isGeneratedIdentifier(referenceIn)) {
87194 var reference = ts.getParseTreeNode(referenceIn, ts.isIdentifier);

Calls 3

getNodeLinksFunction · 0.85
getDeclarationContainerFunction · 0.85
resolveNameFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…