How to make that one property of an object parameter required and the rest optional in TypeScript?

后端 未结 0 681
清歌不尽
清歌不尽 2021-01-23 02:56

I don\'t care what other properties the object has, but need to make sure that it has this one particular. How would you do it?

const sweets = {
      candy: \'Sk         


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