TypeScript/tests/baselines/reference/commentsEnums.js
Sheetal Nandi 6ab3adfd43 Modified the emitComment logic to handle emitting leading or trailing spaces depending on flags
Leading comments have trailing separator while trailing comments have leading space
This removes the extra trailing space in the trailing comments
2014-08-15 14:32:08 -07:00

37 lines
820 B
JavaScript

//// [commentsEnums.ts]
/** Enum of colors*/
enum Colors {
/** Fancy name for 'blue'*/
Cornflower /* blue */,
/** Fancy name for 'pink'*/
FancyPink
} // trailing comment
var x = Colors.Cornflower;
x = Colors.FancyPink;
//// [commentsEnums.js]
/** Enum of colors*/
var Colors;
(function (Colors) {
/** Fancy name for 'blue'*/
Colors[Colors["Cornflower"] = 0] = "Cornflower"; /* blue */
/** Fancy name for 'pink'*/
Colors[Colors["FancyPink"] = 1] = "FancyPink";
})(Colors || (Colors = {})); // trailing comment
var x = 0 /* Cornflower */;
x = 1 /* FancyPink */;
//// [commentsEnums.d.ts]
/** Enum of colors*/
declare enum Colors {
/** Fancy name for 'blue'*/
Cornflower = 0,
/** Fancy name for 'pink'*/
FancyPink = 1,
}
declare var x: Colors;