how to exclude certain proprty from a class typescript

Solutions on MaxInterview for how to exclude certain proprty from a class typescript by the best coders in the world

showing results for - "how to exclude certain proprty from a class typescript"
Marlene
14 Apr 2019
1type UserKeysWithoutEmail = Exclude<UserKeys, "email">;
2
3// This is equivalent to:
4type UserKeysWithoutEmail = Exclude<
5  "id" | "name" | "email",
6  "email"
7>;
8
9// This is equivalent to:
10type UserKeysWithoutEmail = "id" | "name";
11
similar questions