正在加载视频...

视频加载失败

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 次观看 • 1 年前 •via X (Twitter)

10 条评论

Matt Pocock 的头像
Matt Pocock1 年前

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

Théo LUDWIG 的头像
Théo LUDWIG1 年前

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 的头像
Matt Pocock1 年前

Pick is already strict, FYI

Shelton Louis 的头像
Shelton Louis1 年前

You're right!

onurhan 的头像
onurhan1 年前

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

Jacky Hu 的头像
Jacky Hu1 年前

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

Matt Pocock 的头像
Matt Pocock1 年前

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

marc niclas 的头像
marc niclas1 年前

Nah mate, too many characters

Matt Pocock 的头像
Matt Pocock1 年前

It's only me in the video

Suumiboor 的头像
Suumiboor1 年前

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.

相关视频

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 次观看 • 1 年前