studye / typescript

타입스크립트는 자바스크립트랑 다른 언어인가요?
7 stars 0 forks source link

[typescript - 2.4] String enums #47

Open sculove opened 7 years ago

sculove commented 7 years ago

IN

enum Colors {
    Red = "RED",
    Green = "GREEN",
    Blue = "BLUE",
}

OUT

var Colors;
(function (Colors) {
    Colors["Red"] = "RED";
    Colors["Green"] = "GREEN";
    Colors["Blue"] = "BLUE";
})(Colors || (Colors = {}));