📜  typescript 枚举值到枚举 - TypeScript 代码示例

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

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

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

const stringOne = Number[Number.One];