Type Challenges Judge

IsAny

提出詳細

type IsAny<T> = boolean extends (T extends never ? true : false) ? true : false
提出日時2023-08-09 11:38:20
問題IsAny
ユーザーookkoouu
ステータスAccepted
テストケース
import type { Equal, Expect } from '@type-challenges/utils' type cases = [ Expect<Equal<IsAny<any>, true>>, Expect<Equal<IsAny<undefined>, false>>, Expect<Equal<IsAny<unknown>, false>>, Expect<Equal<IsAny<never>, false>>, Expect<Equal<IsAny<string>, false>>, ]