Microsoft/TypeScript
GitHub ã§èŠãComments on constructor super call not preserved in ES5 unless it has additional empty line
Open
#49,045 opened on 2022幎5æ10æ¥
Domain: Comment EmitExperience EnhancementHelp WantedSuggestion
Repository metrics
- Stars
- Â (48,455 stars)
- PR merge metrics
-  (å¹³åããŒãž 6d 17h) (30d ã§ 9 merged PRs)
説æ
Bug Report
ð Search Terms
- comments
- stripped
- super
- constructor
ð Version & Regression Information
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
⯠Playground Link
Playground link with relevant code
ð» Code
class B {
constructor(...args: any[]) {}
}
class A extends B {
constructor(...args: any[]) {
/** this comment is not preserved */
super(...args)
}
}
class C extends B {
constructor(...args: any[]) {
/** this comment is preserved */
super(...args)
}
}
ð Actual behavior
Comment on the super call was not preserved in the ES5 output
ð Expected behavior
Comment on the super call to be preserved