Push
提出詳細
type Push<T extends any[], U> = [...T, U]
提出日時 | 2022-07-11 14:08:06 |
---|---|
問題 | Push |
ユーザー | yamakenji24 |
ステータス | Accepted |
import type { Equal, Expect } from '@type-challenges/utils' type cases = [ Expect<Equal<Push<[], 1>, [1]>>, Expect<Equal<Push<[1, 2], '3'>, [1, 2, '3']>>, Expect<Equal<Push<['1', 2, '3'], boolean>, ['1', 2, '3', boolean]>>, ]