MCPcopy
hub / github.com/rollup/rollup / getSyntheticNamespace

Method getSyntheticNamespace

src/Module.ts:580–596  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

578 }
579
580 getSyntheticNamespace(): Variable {
581 if (this.syntheticNamespace === null) {
582 this.syntheticNamespace = undefined;
583 [this.syntheticNamespace] = this.getVariableForExportName(
584 typeof this.info.syntheticNamedExports === 'string'
585 ? this.info.syntheticNamedExports
586 : 'default',
587 { onlyExplicit: true }
588 );
589 }
590 if (!this.syntheticNamespace) {
591 return error(
592 logSyntheticNamedExportsNeedNamespaceExport(this.id, this.info.syntheticNamedExports)
593 );
594 }
595 return this.syntheticNamespace;
596 }
597
598 getVariableForExportName(
599 name: string,

Calls 3

errorFunction · 0.90

Tested by

no test coverage detected