前回のv3に関する記事でこれまでの変遷を確認したので、ようやく本題のv4についてまとめていきます。 追加された新機能 【v4.0】 Variadic Tuple Types function concat(arr1, arr2) { return [...arr1, ...arr2]; } function tail(arg) { const [_, ...result] = arg; return result } function concat(arr1: [], arr2: []): []; function concat<A>(arr1: [A], arr2: []): [A]; function concat<A, B>(arr1: [A, B], arr2: []): [A, B]; function concat<A, B, C>(arr1: [A, B, C], arr2:
![TypeScript v4 まとめ](https://cdn-ak-scissors.b.st-hatena.com/image/square/fcaf64054c884a7b7867d5a0ea8254d5f599e406/height=288;version=1;width=512/https%3A%2F%2Fres.cloudinary.com%2Fzenn%2Fimage%2Fupload%2Fs--yH_0T7Qu--%2Fc_fit%252Cg_north_west%252Cl_text%3Anotosansjp-medium.otf_66%3ATypeScript%252520v4%252520%2525E3%252581%2525BE%2525E3%252581%2525A8%2525E3%252582%252581%252Cw_1010%252Cx_90%252Cy_100%2Fg_south_west%252Cl_text%3Anotosansjp-medium.otf_37%3Asmish0000%252Cx_203%252Cy_121%2Fg_south_west%252Ch_90%252Cl_fetch%3AaHR0cHM6Ly96ZW5uLWRldi5naXRodWIuaW8vZGVmYXVsdC1hdmF0YXJzL2Rhcmsvcy5wbmc%3D%252Cr_max%252Cw_90%252Cx_87%252Cy_95%2Fv1627283836%2Fdefault%2Fog-base-w1200-v2.png)