IsAny
提出詳細
type IsAny<T> = (T extends true ? T extends false ? true:false:false) extends false ? false:true;
提出日時 | 2022-06-29 23:26:06 |
---|---|
問題 | IsAny |
ユーザー | waki285 |
ステータス | 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>>, ]