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

Function getSpecialPropertyExport

test/fixtures/snapshot/typescript.js:136661–136675  ·  view source on GitHub ↗
(node, useLhsSymbol)

Source from the content-addressed store, hash-verified

136659 return { kind: 1 /* ImportExport.Export */, symbol: symbol, exportInfo: { exportingModuleSymbol: ex.symbol.parent, exportKind: exportKind } };
136660 }
136661 function getSpecialPropertyExport(node, useLhsSymbol) {
136662 var kind;
136663 switch (ts.getAssignmentDeclarationKind(node)) {
136664 case 1 /* AssignmentDeclarationKind.ExportsProperty */:
136665 kind = 0 /* ExportKind.Named */;
136666 break;
136667 case 2 /* AssignmentDeclarationKind.ModuleExports */:
136668 kind = 2 /* ExportKind.ExportEquals */;
136669 break;
136670 default:
136671 return undefined;
136672 }
136673 var sym = useLhsSymbol ? checker.getSymbolAtLocation(ts.getNameOfAccessExpression(ts.cast(node.left, ts.isAccessExpression))) : symbol;
136674 return sym && exportInfo(sym, kind);
136675 }
136676 }
136677 function getImport() {
136678 var isImport = isNodeImport(node);

Callers 1

getExportFunction · 0.85

Calls 1

exportInfoFunction · 0.85

Tested by

no test coverage detected