Type Challenges Judge

Concat

提出詳細

type Concat<T extends any[], K extends any[]> = [...T, ...K]
提出日時2023-04-29 01:19:47
問題Concat
ユーザーDowanna
ステータス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']>>, ]