only '++' and '--' unary operators can change exports

This commit is contained in:
Vladimir Matveev
2015-12-18 11:21:31 -08:00
parent 22856de23a
commit a8f87bb2ca
5 changed files with 185 additions and 1 deletions

View File

@@ -2445,7 +2445,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
}
function emitPrefixUnaryExpression(node: PrefixUnaryExpression) {
const exportChanged = isNameOfExportedSourceLevelDeclarationInSystemExternalModule(node.operand);
const exportChanged = (node.operator === SyntaxKind.PlusPlusToken || node.operator === SyntaxKind.MinusMinusToken) &&
isNameOfExportedSourceLevelDeclarationInSystemExternalModule(node.operand);
if (exportChanged) {
// emit