Open
Description
Hey! TypeScript has these handy reverse mappings! From https://www.typescriptlang.org/docs/handbook/enums.html:
enum Enum {
A,
}
let a = Enum.A;
let nameOfA = Enum[a]; // "A"
[Try](https://www.typescriptlang.org/play/#code/KYOwrgtgBAou0G8BQUoEEA0SC+SkBtgAXKAQygF5Z4A6NAbgOKhFImAHkAzNS6yANqkAuvSgB6cVABEaaUA)
TypeScript compiles this down to the following JavaScript:
"use strict";
var Enum;
(function (Enum) {
Enum[Enum["A"] = 0] = "A";
})(Enum || (Enum = {}));
let a = Enum.A;
let nameOfA = Enum[a]; // "A"
could we get us some of these?