Typescript: How can I set a generic constraint to ensure that a common key between two types also has the same value type?

前端 未结 0 723
花落未央
花落未央 2020-11-28 01:27

I\'m creating a function to copy fields from one object to another and I\'d like to guarantee:

  • I can only give a key that is common between both objects
相关标签:
回答
  • 消灭零回复
提交回复
热议问题