How can I test if Object has value by key without ignoring TypeScript warning: 'string' can't be used to index type?

后端 未结 0 1850
一向
一向 2021-02-14 00:34

I want to write a simple function that looks like this

const options = {
  option1: "option1",
  option2: "option2",
  option3: "option3&         


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