2014-07-13 01:04:16 +02:00
|
|
|
//// [enumNumbering1.ts]
|
|
|
|
enum Test {
|
|
|
|
A,
|
|
|
|
B,
|
|
|
|
C = Math.floor(Math.random() * 1000),
|
|
|
|
D = 10,
|
|
|
|
E // Error but shouldn't be
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//// [enumNumbering1.js]
|
|
|
|
var Test;
|
|
|
|
(function (Test) {
|
|
|
|
Test[Test["A"] = 0] = "A";
|
|
|
|
Test[Test["B"] = 1] = "B";
|
|
|
|
Test[Test["C"] = Math.floor(Math.random() * 1000)] = "C";
|
|
|
|
Test[Test["D"] = 10] = "D";
|
2014-08-15 01:36:33 +02:00
|
|
|
Test[Test["E"] = 11] = "E"; // Error but shouldn't be
|
2014-07-13 01:04:16 +02:00
|
|
|
})(Test || (Test = {}));
|