Back to Type Challenges

README

questions/03062-medium-shift/README.md

latest1.5 KB
Original Source
<!--info-header-start--><h1>Shift </h1><blockquote><p>by jiangshan <a href="https://github.com/jiangshanmeta" target="_blank">@jiangshanmeta</a></p></blockquote><p><a href="https://tsch.js.org/3062/play" target="_blank"></a> &nbsp;&nbsp;&nbsp;<a href="./README.ja.md" target="_blank"></a> </p><!--info-header-end-->

Implement the type version of Array.shift

For example

typescript
type Result = Shift<[3, 2, 1]> // [2, 1]
<!--info-footer-start-->

<a href="../../README.md" target="_blank"></a> <a href="https://tsch.js.org/3062/answer" target="_blank"></a> <a href="https://tsch.js.org/3062/solutions" target="_blank"></a> <hr><h3>Related Challenges</h3><a href="https://github.com/type-challenges/type-challenges/blob/main/questions/00016-medium-pop/README.md" target="_blank"></a> <!--info-footer-end-->