Back to Type Challenges

README

questions/07561-extreme-subtract/README.md

latest1.3 KB
Original Source
<!--info-header-start--><h1>Subtract </h1><blockquote><p>by Lo <a href="https://github.com/LoTwT" target="_blank">@LoTwT</a></p></blockquote><p><a href="https://tsch.js.org/7561/play" target="_blank"></a> </p><!--info-header-end-->

Implement the type Subtraction that is - in Javascript by using BuildTuple.

If the minuend is less than the subtrahend, it should be never.

It's a simple version.

For example

ts
Subtract<2, 1> // expect to be 1
Subtract<1, 2> // expect to be never
<!--info-footer-start-->

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