From 17763ab04058d90b141e555b9cc695483d6c052a Mon Sep 17 00:00:00 2001 From: Stan Thomas Date: Thu, 29 Jan 2015 17:26:53 -0500 Subject: [PATCH] Supress const enum member value comment from emitted javascript in presence of --removeComments --- src/compiler/emitter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 34978ed7fd6..0b6badb7b43 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -2463,7 +2463,7 @@ module ts { var constantValue = resolver.getConstantValue(node); if (constantValue !== undefined) { var propertyName = node.kind === SyntaxKind.PropertyAccessExpression ? declarationNameToString((node).name) : getTextOfNode((node).argumentExpression); - write(constantValue.toString() + " /* " + propertyName + " */"); + write(constantValue.toString() + (!compilerOptions.removeComments ? " /* " + propertyName + " */" : "")); return true; } return false;