Shift
提出詳細
type Shift<T extends any[]> = T extends [...infer Head, any] ? [...Head] : never
提出日時 | 2024-10-30 09:44:14 |
---|---|
問題 | Shift |
ユーザー | balckowl |
ステータス | Wrong Answer |
import type { Equal, Expect } from '@type-challenges/utils' type cases = [ Expect<Equal<Shift<[3, 2, 1]>, [2, 1]>>, Expect<Equal<Shift<['a', 'b', 'c', 'd' ]>, ['b', 'c', 'd']>>, ]