Typescript restrict maximum Array Length

后端 未结 0 1925
清酒与你
清酒与你 2020-12-29 23:29

Basically I want a type of an array with a maximum length of 4. Easily enough I wasn\'t able to find how this check can be implemented in typescript. Can someone help me out

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