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

Function getFirstNonModuleExportsIdentifier

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

Source from the content-addressed store, hash-verified

85071 }
85072 }
85073 function getFirstNonModuleExportsIdentifier(node) {
85074 switch (node.kind) {
85075 case 79 /* SyntaxKind.Identifier */:
85076 return node;
85077 case 161 /* SyntaxKind.QualifiedName */:
85078 do {
85079 node = node.left;
85080 } while (node.kind !== 79 /* SyntaxKind.Identifier */);
85081 return node;
85082 case 206 /* SyntaxKind.PropertyAccessExpression */:
85083 do {
85084 if (ts.isModuleExportsAccessExpression(node.expression) && !ts.isPrivateIdentifier(node.name)) {
85085 return node.name;
85086 }
85087 node = node.expression;
85088 } while (node.kind !== 79 /* SyntaxKind.Identifier */);
85089 return node;
85090 }
85091 }
85092 function checkExternalImportOrExportDeclaration(node) {
85093 var moduleName = ts.getExternalModuleName(node);
85094 if (!moduleName || ts.nodeIsMissing(moduleName)) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…