You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function addComment(property: ts.PropertyDeclaration): void {
ts.addSyntheticLeadingComment(property, ts.SyntaxKind.MultiLevelCommentTrivia, 'this comment will never show up');
}
Expected behavior:
The comment appears in the generated JS file.
Actual behavior:
The comment is missing from the generated JS file.
Playground Link: n/a
Related Issues:
More Info:
The comment is dropped in the ts.ts transform function addInitializedPropertyStatements. As part of transforming the PropertyDeclaration nodes into Statements, their comments are forgotten:
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.
TypeScript Version: 2.7.2
Search Terms: PropertyDeclaration
Code
Expected behavior:
The comment appears in the generated JS file.
Actual behavior:
The comment is missing from the generated JS file.
Playground Link: n/a
Related Issues:
More Info:
The comment is dropped in the
ts.ts
transform functionaddInitializedPropertyStatements
. As part of transforming thePropertyDeclaration
nodes intoStatement
s, their comments are forgotten:https://github.com/Microsoft/TypeScript/blob/master/src/compiler/transformers/ts.ts#L1219
The text was updated successfully, but these errors were encountered: