TypeScript Version: 2.1.5
Code
class Promise {
then(callback:any){};
};
function commentedPromise(){
new Promise()
/* Commented Promise */.then(function(){});
}
function commentedParameters(
/* Parameter a */
a
/* End of parameter a */
/* Parameter b */
,
b
/* End of parameter b */
){}
Expected behavior:
This should be the compiled version:
var Promise = (function () {
function Promise() {
}
Promise.prototype.then = function (callback) { };
;
return Promise;
}());
;
function commentedPromise() {
new Promise()
/* Commented Promise */.then(function () { });
}
function commentedParameters(
/* Parameter a */
a
/* End of parameter a */
/* Parameter b */
,
b
/* End of parameter b */
) { }
Actual behavior:
This is what I get
var Promise = (function () {
function Promise() {
}
Promise.prototype.then = function (callback) { };
;
return Promise;
}());
;
function commentedPromise() {
new Promise()
.then(function () { });
}
function commentedParameters(
/* Parameter a */
a, b) { }
I agree these comments are in very weird positions, but I have a custom build system which uses /#IFDEF/ style guards, and I'm migrating a codebase with some hundreds of them.
Typescript is stripping some of these comments without warning.
TypeScript Version: 2.1.5
Code
Expected behavior:
This should be the compiled version:
Actual behavior:
This is what I get
I agree these comments are in very weird positions, but I have a custom build system which uses /#IFDEF/ style guards, and I'm migrating a codebase with some hundreds of them.
Typescript is stripping some of these comments without warning.