Type Challenges Judge

Trim Left

提出詳細

type Pop<T extends any[]> = T extends [...infer Rest, any] ? Rest : never
提出日時2022-07-16 01:24:14
問題Trim Left
ユーザーaa-0921
ステータスWrong Answer
テストケース
import type { Equal, Expect } from '@type-challenges/utils' type cases = [ Expect<Equal<TrimLeft<'str'>, 'str'>>, Expect<Equal<TrimLeft<' str'>, 'str'>>, Expect<Equal<TrimLeft<' str'>, 'str'>>, Expect<Equal<TrimLeft<' str '>, 'str '>>, Expect<Equal<TrimLeft<' \n\t foo bar '>, 'foo bar '>>, Expect<Equal<TrimLeft<''>, ''>>, Expect<Equal<TrimLeft<' \n\t'>, ''>>, ]