paint-brush
TypeScript's Omit Type Explainedby@smpnjn
10,196 reads
10,196 reads

TypeScript's Omit Type Explained

by Johnny Simpson2mApril 26th, 2022
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow
EN

Too Long; Didn't Read

TypeScript provides a number of utility types that are used to solve a particular problem using types in Javascript. One very useful utility type used in TypeScript is the Omit type, which lets us customize an already existing type. Sometimes, we want to use our type again, but remove certain elements from it, thus creating a new type. Omit accepts two values: Type to base our new type on, Union Type listing all the fields to remove. This gives us the flexibility to use a type, and transform it for specific circumstances.
featured image - TypeScript's Omit Type Explained
Johnny Simpson HackerNoon profile picture
Johnny Simpson

Johnny Simpson

@smpnjn

Product, Engineering, Web

About @smpnjn
LEARN MORE ABOUT @SMPNJN'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Johnny Simpson HackerNoon profile picture
Johnny Simpson@smpnjn
Product, Engineering, Web

TOPICS

Languages

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
Newsbreak
Websiteperu
Com
Lereveilmatin
Coffee-web
Learnrepo
Allella
Anonymousite
Leftic