😽

1日目:type-challenges

に公開

Type Challenges で型を勉強していきます。1 日目。
Pickの問題に挑戦。

解答

type MyPick<T, K extends keyof T> = {
  [P in K]: T[P];
};

Discussion