标签: typescript enums
如何获得一个打字稿字符串枚举的联合类型?
enum MyEnum { A = 'a', // Values are different from keys, so keyof will not help here. B = 'b', }
给定类似上面的枚举类型,如何获得联合类型“a”| “b”?