Supress const enum member value comment from emitted javascript in presence of --removeComments

This commit is contained in:
Stan Thomas 2015-01-29 17:26:53 -05:00
parent 67023a83d5
commit 17763ab040

View File

@ -2463,7 +2463,7 @@ module ts {
var constantValue = resolver.getConstantValue(node);
if (constantValue !== undefined) {
var propertyName = node.kind === SyntaxKind.PropertyAccessExpression ? declarationNameToString((<PropertyAccessExpression>node).name) : getTextOfNode((<ElementAccessExpression>node).argumentExpression);
write(constantValue.toString() + " /* " + propertyName + " */");
write(constantValue.toString() + (!compilerOptions.removeComments ? " /* " + propertyName + " */" : ""));
return true;
}
return false;