TypeScript/tests/baselines/reference/commentsEnums.js

37 lines
818 B
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
//// [commentsEnums.ts]
/** Enum of colors*/
enum Colors {
/** Fancy name for 'blue'*/
Cornflower /* blue */,
/** Fancy name for 'pink'*/
FancyPink
2014-08-15 22:50:47 +02:00
} // trailing comment
2014-07-13 01:04:16 +02:00
var x = Colors.Cornflower;
x = Colors.FancyPink;
//// [commentsEnums.js]
2014-08-14 15:48:40 +02:00
/** Enum of colors*/
2014-07-13 01:04:16 +02:00
var Colors;
(function (Colors) {
2014-08-14 15:48:40 +02:00
/** Fancy name for 'blue'*/
Colors[Colors["Cornflower"] = 0] = "Cornflower"; /* blue */
2014-08-14 15:48:40 +02:00
/** Fancy name for 'pink'*/
2014-07-13 01:04:16 +02:00
Colors[Colors["FancyPink"] = 1] = "FancyPink";
2014-08-15 22:50:47 +02:00
})(Colors || (Colors = {})); // trailing comment
var x = Colors.Cornflower;
x = Colors.FancyPink;
2014-07-13 01:04:16 +02:00
//// [commentsEnums.d.ts]
/** Enum of colors*/
declare enum Colors {
/** Fancy name for 'blue'*/
Cornflower = 0,
/** Fancy name for 'pink'*/
FancyPink = 1,
}
2014-07-12 01:36:06 +02:00
declare var x: Colors;