mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
Merge pull request #10760 from Microsoft/fix10731_commentDecoratedClass
Fix10731: Correctly emit comment for decorated class declaration
This commit is contained in:
@@ -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
|
||||
)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user