📜  如何从类打字稿代码示例中排除某些属性

📅  最后修改于: 2022-03-11 14:48:18.951000             🧑  作者: Mango

代码示例1
type UserKeysWithoutEmail = Exclude;

// This is equivalent to:
type UserKeysWithoutEmail = Exclude<
  "id" | "name" | "email",
  "email"
>;

// This is equivalent to:
type UserKeysWithoutEmail = "id" | "name";