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

Function getAnyImportSyntax

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

Source from the content-addressed store, hash-verified

50337 || (n === stopAt || ts.isFunctionLike(n) && !ts.getImmediatelyInvokedFunctionExpression(n) ? "quit" : false); });
50338 }
50339 function getAnyImportSyntax(node) {
50340 switch (node.kind) {
50341 case 265 /* SyntaxKind.ImportEqualsDeclaration */:
50342 return node;
50343 case 267 /* SyntaxKind.ImportClause */:
50344 return node.parent;
50345 case 268 /* SyntaxKind.NamespaceImport */:
50346 return node.parent.parent;
50347 case 270 /* SyntaxKind.ImportSpecifier */:
50348 return node.parent.parent.parent;
50349 default:
50350 return undefined;
50351 }
50352 }
50353 function getDeclarationOfAliasSymbol(symbol) {
50354 return symbol.declarations && ts.findLast(symbol.declarations, isAliasSymbolDeclaration);
50355 }

Callers 2

getIsDeclarationVisibleFunction · 0.85
buildVisibleNodeListFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected