Closed
Description
TypeScript Version: 3.5.1
Search Terms:
comments comment mangling emitted code doc docs strip code
Code
Especially annoying problem while using tools like strip code etc.
class ABC {
// #DEBUG
private a () {}
// #ENDDEBUG
public z = 1;
}
Expected behavior:
"use strict";
class ABC {
constructor() {
this.z = 1;
}
// #DEBUG
a() { }
// #ENDDEBUG
}
Actual behavior:
"use strict";
class ABC {
constructor() {
// #ENDDEBUG
this.z = 1;
}
// #DEBUG
a() { }
}
Playground Link:
Misplaced:
http://www.typescriptlang.org/play/#code/MYGwhgzhAECCBCBhaBvAUNT0D03oGIARAUXgFUBxDLABwCcBLANzABcBTaMaACgEpUAX2qZcBYgDlCJclSzQaAVwBGIBsGgAvaAF5oARgDcaQUA
Removed:
http://www.typescriptlang.org/play/#code/MYGwhgzhAECCBCBhaBvAUNT0D03oGIARAUXgFUBxDLABwCcBLANzABcBTaMaACgEpUAX2qZcBYgDlCJclUFA
Related Issues:
Checked #1311 and #10385. The #1311 works better but still failing in one case.