Back to Type Challenges

README

questions/08640-medium-number-range/README.md

latest1.1 KB
Original Source
<!--info-header-start--><h1>Number Range </h1><blockquote><p>by AaronGuo <a href="https://github.com/HongxuanG" target="_blank">@HongxuanG</a></p></blockquote><p><a href="https://tsch.js.org/8640/play" target="_blank"></a> </p><!--info-header-end-->

Sometimes we want to limit the range of numbers... For examples.

ts
type result = NumberRange<2 , 9> //  | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 
<!--info-footer-start-->

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