Create a lookup type using one of the fields in typescript

前端 未结 0 469
孤城傲影
孤城傲影 2020-11-27 04:55

I want to create a lookup-data-type that store constant information. Usually I do something as follows:

const ROLES: { [key in "admin" | "viewe         


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