Explain Partial, Required, Pick, Omit, and Record with a use case for each.
Fluency with the built-ins senior TS devs use daily instead of re-declaring shapes.
Partial<T> makes all fields optional (patch/update payloads). Required<T> is the inverse. Pick<T,K> selects a subset of keys (a narrow view of a big model). Omit<T,K> removes keys (props minus the ones a wrapper injects). Record<K,V> builds a map type (Record<string, User>). These are derived types — change the source model and they update automatically, which is the point: one source of truth. Under the hood they're all just mapped/conditional types you could write yourself: Partial<T> is { [K in keyof T]?: T[K] }, Pick<T,K> is { [P in K]: T[P] }, and Omit<T,K> is Pick<T, Exclude<keyof T, K>>. Knowing that lets you compose them: Partial<Pick<User, 'name' | 'email'>> is an optional-fields update over just two columns. Other high-value ones: Readonly<T>, ReturnType<typeof fn>, Parameters<typeof fn>, Awaited<T> (unwraps a Promise), and NonNullable<T>. Reach for these before hand-writing a second interface that duplicates the first.
updateUser(patch: Partial<User>); type CardProps = Pick<User,'name'|'avatar'>; type ButtonProps = Omit<NativeButtonProps,'ref'>; const byId: Record<string,User>.