Concat
提出詳細
type Tuple = readonly any[]; type Concat<T extends Tuple, U extends Tuple> = [...T, ...U];
| 提出日時 | 2024-08-26 22:49:05 | 
|---|---|
| 問題 | Concat | 
| ユーザー | Katsukiniwa | 
| ステータス | Accepted | 
import type { Equal, Expect } from '@type-challenges/utils' type cases = [ Expect<Equal<Concat<[], []>, []>>, Expect<Equal<Concat<[], [1]>, [1]>>, Expect<Equal<Concat<[1, 2], [3, 4]>, [1, 2, 3, 4]>>, Expect<Equal<Concat<['1', 2, '3'], [false, boolean, '4']>, ['1', 2, '3', false, boolean, '4']>>, ]