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

Function getSymbol

test/fixtures/snapshot/typescript.js:49359–49377  ·  view source on GitHub ↗
(symbols, name, meaning)

Source from the content-addressed store, hash-verified

49357 return node.kind === 305 /* SyntaxKind.SourceFile */ && !ts.isExternalOrCommonJsModule(node);
49358 }
49359 function getSymbol(symbols, name, meaning) {
49360 if (meaning) {
49361 var symbol = getMergedSymbol(symbols.get(name));
49362 if (symbol) {
49363 ts.Debug.assert((ts.getCheckFlags(symbol) & 1 /* CheckFlags.Instantiated */) === 0, "Should never get an instantiated symbol here.");
49364 if (symbol.flags & meaning) {
49365 return symbol;
49366 }
49367 if (symbol.flags & 2097152 /* SymbolFlags.Alias */) {
49368 var target = resolveAlias(symbol);
49369 // Unknown symbol means an error occurred in alias resolution, treat it as positive answer to avoid cascading errors
49370 if (target === unknownSymbol || target.flags & meaning) {
49371 return symbol;
49372 }
49373 }
49374 }
49375 }
49376 // return undefined if we can't find a symbol.
49377 }
49378 /**
49379 * Get symbols that represent parameter-property-declaration as parameter and as property declaration
49380 * @param parameter a parameterDeclaration node

Calls 5

getMergedSymbolFunction · 0.85
resolveAliasFunction · 0.85
shouldSkipAliasFunction · 0.85
assertMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…