mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
Emit leading comment before brace token
This commit is contained in:
@@ -1347,6 +1347,8 @@ namespace ts {
|
||||
else {
|
||||
writeToken(SyntaxKind.OpenBraceToken, node.pos, /*contextNode*/ node);
|
||||
emitBlockStatements(node);
|
||||
// We have to call emitLeadingComments explicitly here because otherwise leading comments of the close brace token will not be emitted
|
||||
emitLeadingComments(node.statements.end, /*isEmittedNode*/true);
|
||||
writeToken(SyntaxKind.CloseBraceToken, node.statements.end, /*contextNode*/ node);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user