MCPcopy Create free account
hub / github.com/nodejs/node / forEachExportReference

Function forEachExportReference

test/fixtures/snapshot/typescript.js:152177–152185  ·  view source on GitHub ↗
(sourceFile, cb)

Source from the content-addressed store, hash-verified

152175 });
152176 }
152177 function forEachExportReference(sourceFile, cb) {
152178 sourceFile.forEachChild(function recur(node) {
152179 if (ts.isPropertyAccessExpression(node) && ts.isExportsOrModuleExportsOrAlias(sourceFile, node.expression) && ts.isIdentifier(node.name)) {
152180 var parent = node.parent;
152181 cb(node, ts.isBinaryExpression(parent) && parent.left === node && parent.operatorToken.kind === 63 /* SyntaxKind.EqualsToken */);
152182 }
152183 node.forEachChild(recur);
152184 });
152185 }
152186 function convertStatement(sourceFile, statement, checker, changes, identifiers, target, exports, useSitesToUnqualify, quotePreference) {
152187 switch (statement.kind) {
152188 case 237 /* SyntaxKind.VariableStatement */:

Callers 2

collectExportRenamesFunction · 0.85
convertExportsAccessesFunction · 0.85

Calls 2

forEachChildMethod · 0.80
cbFunction · 0.50

Tested by

no test coverage detected