Loading video...

Video Failed to Load

Go Home

I STILL get so many folks misunderstanding the difference between: Pick, Omit Exclude, Extract They should be called: PickFromObject, OmitFromObject ExcludeFromUnion, ExtractFromUnion Here's a breakdown:

32,246 views • 1 year ago •via X (Twitter)

10 Comments

Matt Pocock's profile picture
Matt Pocock1 year ago

Here's my course - it's 30% off right now

Théo LUDWIG's profile picture
Théo LUDWIG1 year ago

I always end up copy/pasting the stricter version in my projects and never use the original one: export type OmitStrict<T, K extends keyof T> = Omit<T, K> export type PickStrict<T, K extends keyof T> = Pick<T, K>

Matt Pocock's profile picture
Matt Pocock1 year ago

Pick is already strict, FYI

Shelton Louis's profile picture
Shelton Louis1 year ago

You're right!

onurhan's profile picture
onurhan1 year ago

I can recommend an interactive article about difference between Pick and Omit

Jacky Hu's profile picture
Jacky Hu1 year ago

🙋‍♂️ type Album = { // ... artist: string // ... } what's diff between 1. Pick<Album, 'artist'> 2. Album['artist'] thanks 🙏

Matt Pocock's profile picture
Matt Pocock1 year ago

type Album = { artist: string }; Album['artist']; // string Pick<Album, 'artist'>; // { artist: string }

marc niclas's profile picture
marc niclas1 year ago

Nah mate, too many characters

Matt Pocock's profile picture
Matt Pocock1 year ago

It's only me in the video

Suumiboor's profile picture
Suumiboor1 year ago

It's a weird multi-level almost set-like thing that syntax... would love to see something cleaner, at least that's my current understanding.

Related Videos

I’ll get called a supremacist for this breakdown. So be it.
2:12

Sensitive content

I’ll get called a supremacist for this breakdown. So be it.

Amiri King

139,517 views • 1 year ago