Skip to content

Instantly share code, notes, and snippets.

@shigemk2
Created February 21, 2015 13:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shigemk2/81eda5c55cff95acad28 to your computer and use it in GitHub Desktop.
Save shigemk2/81eda5c55cff95acad28 to your computer and use it in GitHub Desktop.
var e;
(function (e) {
e[e["a"] = 0] = "a";
e[e["b"] = 1] = "b";
})(e || (e = {}));
var x;
x = 0 /* a */;
console.log(x);
x++;
var y = x++;
console.log(x);
console.log(typeof x);
console.log(y);
console.log(typeof y);
enum e {
a, b
}
var x: e;
x = e.a;
console.log(x); // 0
x++;
var y = x++;
console.log(x); // 2
console.log(typeof x); // number
console.log(y); // 1
console.log(typeof y); // number
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment