Back to Type Challenges

README

questions/00533-easy-concat/README.md

latest2.2 KB
Original Source
<!--info-header-start--><h1>Concat </h1><blockquote><p>by Andrey Krasovsky <a href="https://github.com/bre30kra69cs" target="_blank">@bre30kra69cs</a></p></blockquote><p><a href="https://tsch.js.org/533/play" target="_blank"></a> &nbsp;&nbsp;&nbsp;<a href="./README.zh-CN.md" target="_blank"></a> <a href="./README.ja.md" target="_blank"></a> <a href="./README.ko.md" target="_blank"></a> </p><!--info-header-end-->

Implement the JavaScript Array.concat function in the type system. A type takes the two arguments. The output should be a new array that includes inputs in ltr order

For example:

ts
type Result = Concat<[1], [2]> // expected to be [1, 2]
<!--info-footer-start-->

<a href="../../README.md" target="_blank"></a> <a href="https://tsch.js.org/533/answer" target="_blank"></a> <a href="https://tsch.js.org/533/solutions" target="_blank"></a> <hr><h3>Related Challenges</h3><a href="https://github.com/type-challenges/type-challenges/blob/main/questions/03057-easy-push/README.md" target="_blank"></a> <a href="https://github.com/type-challenges/type-challenges/blob/main/questions/03060-easy-unshift/README.md" target="_blank"></a> <!--info-footer-end-->