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>>, ]