6. Omit<T, K> を実装する

TypeScript

  - accepted / - tried

Omit<T, K>は、Tのプロパティーから、Kにないものを抽出して作ったtypeを返す。

MyOmit<T, K>を実装してみてください。

type Foo = {  a: string  b: number  c: boolean}type A = MyOmit<Foo, 'a' | 'b'> // {c: boolean}type B = MyOmit<Foo, 'c'> // {a: string, b: number}type C = MyOmit<Foo, 'c' | 'd'> // {a: string, b: number}

5分間以内で解いてみて