Typescript: only allow one occurrence of a value in an array

前端 未结 0 827
执念已碎
执念已碎 2021-01-19 23:25

Is there an easy way to only allow one occurrence of a value in an array?

Lets say I have defined types like this:

  array: {
    value: boolean;
    l         


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