How can I restrict a TypeScript method to receive `keyof` values for fields of a certain type?

前端 未结 0 862
情歌与酒
情歌与酒 2020-12-02 03:55

I am trying to write a function that will update a field of an object if a value that was passed in changed versus what\'s already in the object. The closest thing i\'ve got

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