How to access Enum in typescript ? giving error “Element implicitly has an any type because index expression is not of type number”

前端 未结 0 695
一整个雨季
一整个雨季 2021-01-14 23:15
export enum r {
color1 = "Red"
color2 = "green"
color3 = "blue"
}

ar = ["color1","color2"];
ar.map(e => {
if(r[         


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