KeysOfType and exact type of property

前端 未结 0 596
温柔的废话
温柔的废话 2020-12-18 15:59

I\'m using KeysOfType from https://stackoverflow.com/a/49752227:

type KeysOfType = { [P in keyof T]: T[P] extends TProp? P : never }[keyof T];

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