Back to Type Challenges

README

questions/07544-medium-construct-tuple/README.md

latest1.3 KB
Original Source
<!--info-header-start--><h1>Construct Tuple </h1><blockquote><p>by Lo <a href="https://github.com/LoTwT" target="_blank">@LoTwT</a></p></blockquote><p><a href="https://tsch.js.org/7544/play" target="_blank"></a> &nbsp;&nbsp;&nbsp;<a href="./README.zh-CN.md" target="_blank"></a> </p><!--info-header-end-->

Construct a tuple with a given length.

For example

ts
type result = ConstructTuple<2> // expect to be [unknown, unknown]
<!--info-footer-start-->

<a href="../../README.md" target="_blank"></a> <a href="https://tsch.js.org/7544/answer" target="_blank"></a> <a href="https://tsch.js.org/7544/solutions" target="_blank"></a> <!--info-footer-end-->