mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-11-18 20:11:14 +00:00
fix(44477): emit full path to access expressions in comments (#44545)
Co-authored-by: Wesley Wigham <wewigham@microsoft.com>
This commit is contained in:
1 parent
4abad556be
commit
5f9f9e3752
40 files changed
+253
-257
No files matched your search
@@ -3368,13 +3368,9 @@ namespace ts {
|
||||
const substitute = typeof constantValue === "string" ? factory.createStringLiteral(constantValue) : factory.createNumericLiteral(constantValue);
|
||||
if (!compilerOptions.removeComments) {
|
||||
const originalNode = getOriginalNode(node, isAccessExpression);
|
||||
const propertyName = isPropertyAccessExpression(originalNode)
|
||||
? declarationNameToString(originalNode.name)
|
||||
: safeMultiLineComment(getTextOfNode(originalNode.argumentExpression));
|
||||
|
||||
addSyntheticTrailingComment(substitute, SyntaxKind.MultiLineCommentTrivia, ` ${propertyName} `);
|
||||
addSyntheticTrailingComment(substitute, SyntaxKind.MultiLineCommentTrivia, ` ${safeMultiLineComment(getTextOfNode(originalNode))} `);
|
||||
}
|
||||
|
||||
return substitute;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user