Enforce object to contain all keys of an enum and still have type inference for it's values

后端 未结 0 1930
有刺的猬
有刺的猬 2020-12-10 18:14

I have an object and I want to enforce it to contain all keys of an Enum, and I also want the type of it’s values to be inferred. So if I do this:

enum Requir         


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