How to map a enum into an array with elements with the values of the items of the enum itself in TypeScript?

后端 未结 0 585
旧时难觅i
旧时难觅i 2020-11-30 11:56

E.g. with a TS enum as below.

export enum UserType {
    Guest = 1,
    SNS = 2,
    Account = 3,
    Certified = 4,
}

Can I do Object.map(or

相关标签:
回答
  • 消灭零回复
提交回复
热议问题