Exclude
提出詳細
type Exclude<T, K extends keyof T> = { [P in keyof T as P extends K ? never : P]: T[P] }
提出日時 | 2023-04-29 00:01:07 |
---|---|
問題 | Exclude |
ユーザー | Dowanna |
ステータス | Wrong Answer |
import type { Equal, Expect } from '@type-challenges/utils' type cases = [ Expect<Equal<MyExclude<'a' | 'b' | 'c', 'a'>, Exclude<'a' | 'b' | 'c', 'a'>>>, Expect<Equal<MyExclude<'a' | 'b' | 'c', 'a' | 'b'>, Exclude<'a' | 'b' | 'c', 'a' | 'b'>>>, Expect<Equal<MyExclude<string | number | (() => void), Function>, Exclude<string | number | (() => void), Function>>>, ]