Closed
Description
Here's a scenario in which trailing whitespace is not trimmed in d.ts output, specifically when adding jsdoc-style comments above each arg with line breaks in-between:
export class Point {
constructor(
/**
* The x coordinate.
*/
public x: number,
/**
* The y coordinate.
*/
public y: number
) {
}
}
The generated output has spaces after each argument's comma that has another argument after it. In this case, only the x
arg has the space after the comma:
define(["require", "exports"], function (require, exports) {
var Point = (function () {
function Point(
/**
* The x coordinate.
*/
x, <-- trailing whitespace!
/**
* The y coordinate.
*/
y) {
this.x = x;
this.y = y;
}
return Point;
})();
exports.Point = Point;
});
See the result on the TypeScript Playground.