Pop
提出詳細
type Pop<T extends readonly unknown[]> = T extends [...infer Tail, unknown] ? Tail:never;
提出日時 | 2022-06-27 11:36:29 |
---|---|
問題 | Pop |
ユーザー | waki285 |
ステータス | Accepted |
import type { Equal, Expect } from '@type-challenges/utils' type cases = [ Expect<Equal<Pop<[3, 2, 1]>, [3, 2]>>, Expect<Equal<Pop<['a', 'b', 'c', 'd' ]>, ['a', 'b', 'c']>>, ]