TypeScript's Omit Type Explainedby@smpnjn
8,790 reads

TypeScript's Omit Type Explained

tldt arrow
EN
Read on Terminal Reader🖨️

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

@smpnjn

Johnny Simpson

About @smpnjn
LEARN MORE ABOUT @SMPNJN'S EXPERTISE AND PLACE ON THE INTERNET.
react to story with heart

RELATED STORIES

L O A D I N G
. . . comments & more!
Hackernoon hq - po box 2206, edwards, colorado 81632, usa