TypeScript/tests/baselines/reference/commentsEnums.js

37 lines
781 B
JavaScript
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
}
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";
})(Colors || (Colors = {}));
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,
}
2014-07-12 01:36:06 +02:00
declare var x: Colors;