Never elide an export * when --isolatedModules is set

This commit is contained in:
Andy Hanson
2017-05-02 14:11:46 -07:00
parent 1db4f96fd1
commit e696bbcd22
5 changed files with 37 additions and 1 deletions

View File

@@ -2922,7 +2922,7 @@ namespace ts {
function visitExportDeclaration(node: ExportDeclaration): VisitResult<Statement> {
if (!node.exportClause) {
// Elide a star export if the module it references does not export a value.
return resolver.moduleExportsSomeValue(node.moduleSpecifier) ? node : undefined;
return compilerOptions.isolatedModules || resolver.moduleExportsSomeValue(node.moduleSpecifier) ? node : undefined;
}
if (!resolver.isValueAliasDeclaration(node)) {