MCPcopy Index your code
hub / github.com/rollup/rollup / getExportNamesByVariable

Method getExportNamesByVariable

src/Module.ts:546–565  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

544 }
545
546 getExportNamesByVariable(): Map<Variable, string[]> {
547 if (this.exportNamesByVariable) {
548 return this.exportNamesByVariable;
549 }
550 const exportNamesByVariable = new Map<Variable, string[]>();
551 for (const [exportName, variable] of this.getExportedVariablesByName().entries()) {
552 const tracedVariable =
553 variable instanceof ExportDefaultVariable ? variable.getOriginalVariable() : variable;
554 if (!variable || !(variable.included || variable instanceof ExternalVariable)) {
555 continue;
556 }
557 const existingExportNames = exportNamesByVariable.get(tracedVariable);
558 if (existingExportNames) {
559 existingExportNames.push(exportName);
560 } else {
561 exportNamesByVariable.set(tracedVariable, [exportName]);
562 }
563 }
564 return (this.exportNamesByVariable = exportNamesByVariable);
565 }
566
567 getRenderedExports(): { removedExports: string[]; renderedExports: string[] } {
568 // only direct exports are counted here, not reexports at all

Callers 6

canModuleBeFacadeMethod · 0.80
generateExportsMethod · 0.80
generateFacadesMethod · 0.80

Calls 5

getOriginalVariableMethod · 0.80
getMethod · 0.80
pushMethod · 0.80
setMethod · 0.65

Tested by

no test coverage detected