Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

how to exclude certain proprty from a class typescript

type UserKeysWithoutEmail = Exclude<UserKeys, "email">;

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

// This is equivalent to:
type UserKeysWithoutEmail = "id" | "name";
Source by mariusschulz.com #
 
PREVIOUS NEXT
Tagged: #exclude #proprty #class #typescript
ADD COMMENT
Topic
Name
7+8 =