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

Function getTypeReferenceDirectivesForEntityName

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

Source from the content-addressed store, hash-verified

87384 }
87385 // defined here to avoid outer scope pollution
87386 function getTypeReferenceDirectivesForEntityName(node) {
87387 // program does not have any files with type reference directives - bail out
87388 if (!fileToDirective) {
87389 return undefined;
87390 }
87391 // property access can only be used as values, or types when within an expression with type arguments inside a heritage clause
87392 // qualified names can only be used as types\namespaces
87393 // identifiers are treated as values only if they appear in type queries
87394 var meaning = 788968 /* SymbolFlags.Type */ | 1920 /* SymbolFlags.Namespace */;
87395 if ((node.kind === 79 /* SyntaxKind.Identifier */ && isInTypeQuery(node)) || (node.kind === 206 /* SyntaxKind.PropertyAccessExpression */ && !isInHeritageClause(node))) {
87396 meaning = 111551 /* SymbolFlags.Value */ | 1048576 /* SymbolFlags.ExportValue */;
87397 }
87398 var symbol = resolveEntityName(node, meaning, /*ignoreErrors*/ true);
87399 return symbol && symbol !== unknownSymbol ? getTypeReferenceDirectivesForSymbol(symbol, meaning) : undefined;
87400 }
87401 // defined here to avoid outer scope pollution
87402 function getTypeReferenceDirectivesForSymbol(symbol, meaning) {
87403 // program does not have any files with type reference directives - bail out

Callers

nothing calls this directly

Calls 4

isInTypeQueryFunction · 0.85
isInHeritageClauseFunction · 0.85
resolveEntityNameFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…