Partial, Pick, Omit, Record — what are they for?
Answer out loud or in your head first, then compare.
Answer
Utility types build new types from existing ones, cutting down on repeated declarations.
TypeScript
type User = { id: string; name: string; email: string };
type UserPatch = Partial<Pick<User, 'name' | 'email'>>;
type PublicUser = Omit<User, 'email'>;
type UsersById = Record<string, User>;Partial makes fields optional; Pick selects fields; Omit leaves them out; Record describes a mapping from keys to values.
Pitfall: Omit doesn't remove data from the actual object. If I don't want to send the email to the client, I build a proper response object. With a map I don't guarantee that any key exists — it's worth accounting for undefined and noUncheckedIndexedAccess.
How did it go? Be honest — “Not yet” puts the question on your review list.