mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 21:06:50 -05:00
Retain reexports in js emit even when they export nothing (#37124)
This commit is contained in:
@@ -2859,9 +2859,11 @@ namespace ts {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
if (!node.exportClause) {
|
||||
// Elide a star export if the module it references does not export a value.
|
||||
return compilerOptions.isolatedModules || resolver.moduleExportsSomeValue(node.moduleSpecifier!) ? node : undefined;
|
||||
if (!node.exportClause || isNamespaceExport(node.exportClause)) {
|
||||
// never elide `export <whatever> from <whereever>` declarations -
|
||||
// they should be kept for sideffects/untyped exports, even when the
|
||||
// type checker doesn't know about any exports
|
||||
return node;
|
||||
}
|
||||
|
||||
if (!resolver.isValueAliasDeclaration(node)) {
|
||||
|
||||
Reference in New Issue
Block a user