Correct emit comment for decorated class declaration

This commit is contained in:
Yui T
2016-09-07 13:54:52 -07:00
parent 5c72a32c64
commit 60b382d1b3
+13 -11
View File
@@ -694,19 +694,21 @@ namespace ts {
// let ${name} = ${classExpression} where name is either declaredName if the class doesn't contain self-reference
// or decoratedClassAlias if the class contain self-reference.
const transformedClassExpression = createVariableStatement(
/*modifiers*/ undefined,
createLetDeclarationList([
createVariableDeclaration(
classAlias || declaredName,
/*type*/ undefined,
classExpression
)
]),
/*location*/ location
);
setCommentRange(transformedClassExpression, node);
statements.push(
setOriginalNode(
createVariableStatement(
/*modifiers*/ undefined,
createLetDeclarationList([
createVariableDeclaration(
classAlias || declaredName,
/*type*/ undefined,
classExpression
)
]),
/*location*/ location
),
/*node*/ transformedClassExpression,
/*original*/ node
)
);