enum Color {Red, Green, Blue};
var Color;(function (Color) { Color[Color["Red"] = 0] = "Red"; Color[Color["Green"] = 1] = "Green"; Color[Color["Blue"] = 2] = "Blue";})(Color || (Color = {}));
这是typescript里enum类型的源码,看不懂Color[Color["Red"] = 0] = "Red"这什么意思?
相关分类