Back to Type Challenges

README

questions/03057-easy-push/README.md

latest2.0 KB
Original Source
<!--info-header-start--><h1>Push </h1><blockquote><p>by jiangshan <a href="https://github.com/jiangshanmeta" target="_blank">@jiangshanmeta</a></p></blockquote><p><a href="https://tsch.js.org/3057/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 generic version of Array.push

For example:

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

<a href="../../README.md" target="_blank"></a> <a href="https://tsch.js.org/3057/answer" target="_blank"></a> <a href="https://tsch.js.org/3057/solutions" target="_blank"></a> <hr><h3>Related Challenges</h3><a href="https://github.com/type-challenges/type-challenges/blob/main/questions/00533-easy-concat/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-->