emit export specifiers in system modules only if export has a value side

This commit is contained in:
Vladimir Matveev
2015-09-11 09:36:17 -07:00
parent a5c72014b0
commit c72469a66f
5 changed files with 318 additions and 1 deletions

View File

@@ -3142,6 +3142,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
function emitExportSpecifierInSystemModule(specifier: ExportSpecifier): void {
Debug.assert(compilerOptions.module === ModuleKind.System);
if (!resolver.getReferencedValueDeclaration(specifier.propertyName || specifier.name) && !resolver.isValueAliasDeclaration(specifier) ) {
return;
}
writeLine();
emitStart(specifier.name);
@@ -6089,7 +6093,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
return;
}
if (isInternalModuleImportEqualsDeclaration(node)) {
if (isInternalModuleImportEqualsDeclaration(node) && resolver.isValueAliasDeclaration(node)) {
if (!hoistedVars) {
hoistedVars = [];
}