📜  typescript 枚举到字符串 - TypeScript 代码示例

📅  最后修改于: 2022-03-11 14:48:15.529000             🧑  作者: Mango

代码示例3
enum Number {
  One,
  Two
}  

const numberOne: Number = "One" as Number;
const otherNumberOne: Number = Number.One;

const stringOne = Number[Number.One];