Can typescript infer type of other properties during object assignment

前端 未结 0 1927
孤独总比滥情好
孤独总比滥情好 2021-02-09 19:34

I\'m working on a large Sanity.io CMS project that involves writing a lot of JS to define content types such as below:

const person = {
  type: \'document\',
  na         


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