enum SwitchedEnum {
  ON,
  OFF
}
const enum ConstSwitchedEnum {
  ON,
  OFF
}
type SwitchedType = 'ON' | 'OFF';is transpiled to the following JS:
var SwitchedEnum;
(function (SwitchedEnum) {
    SwitchedEnum[SwitchedEnum["ON"] = 0] = "ON";
    SwitchedEnum[SwitchedEnum["OFF"] = 1] = "OFF";
})(SwitchedEnum || (SwitchedEnum = {}));No ConstSwitchedEnum or SwitchedType in the JS. Try it out.