How to have typescript check for valid object property names

前端 未结 0 1964
予麋鹿
予麋鹿 2020-11-22 05:04

I\'m using typescript and have an object defined with different people\'s names:

const data = {
   John: someTypedVariable,
   Alex: someTypedVariable,
   Ann         


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