-
Notifications
You must be signed in to change notification settings - Fork 12.8k
No comment preservation for parenthesized expressions #9873
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Bug
A bug in TypeScript
Domain: Comment Emit
The issue relates to the emission of comments when compiling
Fixed
A PR has been merged for this issue
Milestone
Comments
var x = /** @type {Foo.Bar} */y; is also unpreserved. It's not unique to parenthesized expressions. |
Also happens for dotted expressions: let x = /** @type {string} */ foo.bar; |
Not sure if related, but it also happens for regular comments when they appear before a }: // Comment
let a = 5;
// Another comment
if (a === 5) {
alert('hello world');
// Third comment
} Compiles to: // Comment
var a = 5;
// Another comment
if (a === 5) {
alert('hello world');
} |
tbosch
added a commit
to tbosch/tsickle
that referenced
this issue
Aug 1, 2017
when using a call expression. E.g. ``` Polymer({behaviors: [(Polymer as any).NeonAnimationRunnerBehavior]) ``` This type cast was never emitted in non transformer mode due to microsoft/TypeScript#9873. This is a temporary workaround, the real fix is to change the Polymer Closure plugin (see angular#529).
tbosch
added a commit
to tbosch/tsickle
that referenced
this issue
Aug 1, 2017
when using a call expression. E.g. ``` Polymer({behaviors: [(Polymer as any).NeonAnimationRunnerBehavior]) ``` This type cast was never emitted in non transformer mode due to microsoft/TypeScript#9873. This is a temporary workaround, the real fix is to change the Polymer Closure plugin (see angular#529).
tbosch
added a commit
to tbosch/tsickle
that referenced
this issue
Aug 1, 2017
when using a call expression. E.g. ``` Polymer({behaviors: [(Polymer as any).NeonAnimationRunnerBehavior]) ``` This type cast was never emitted in non transformer mode due to microsoft/TypeScript#9873. This is a temporary workaround, the real fix is to change the Polymer Closure plugin (see angular#529).
tbosch
added a commit
to tbosch/tsickle
that referenced
this issue
Aug 1, 2017
when using a call expression. E.g. ``` Polymer({behaviors: [(Polymer as any).NeonAnimationRunnerBehavior]) ``` This type cast was never emitted in non transformer mode due to microsoft/TypeScript#9873. This is a temporary workaround, the real fix is to change the Polymer Closure plugin (see angular#529).
tbosch
added a commit
to angular/tsickle
that referenced
this issue
Aug 1, 2017
when using a call expression. E.g. ``` Polymer({behaviors: [(Polymer as any).NeonAnimationRunnerBehavior]) ``` This type cast was never emitted in non transformer mode due to microsoft/TypeScript#9873. This is a temporary workaround, the real fix is to change the Polymer Closure plugin (see #529).
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
Bug
A bug in TypeScript
Domain: Comment Emit
The issue relates to the emission of comments when compiling
Fixed
A PR has been merged for this issue
@evmar ran into issues where generating a JSDoc comment for a type assertion for Closure did not get preserved.
Neither
nor
have their comments preserved, though I'm not sure which is more common.
The text was updated successfully, but these errors were encountered: