What are TypeScript utility types?
The short answer
Utility types are built in generic types that transform an existing type into a new one. Instead of redefining a shape by hand when you need a slightly different version of it, you derive the new type from the original. This keeps one source of truth: when the base type changes, every type derived from it updates automatically.
The common ones
interface User { id: number; name: string; email: string;}// Partial: every property becomes optionaltype UserUpdate = Partial<User>;// { id?: number; name?: string; email?: string }// Required: every property becomes requiredtype FullUser = Required<UserUpdate>;// Pick: keep only the listed keystype UserPreview = Pick<User, 'id' | 'name'>;// Omit: drop the listed keystype PublicUser = Omit<User, 'email'>;// Record: build a map from keys to a value typetype RolePermissions = Record<'admin' | 'editor', string[]>;// { admin: string[]; editor: string[] }// ReturnType: pull out a function's return typefunction getUser() { return { id: 1, name: 'Ada' };}type GetUserResult = ReturnType<typeof getUser>;// { id: number; name: string }Why they matter
Imagine an edit form that can update any field on a User. The data it sends is a User with every field optional. Without utility types you would write that shape by hand and keep it in sync. With Partial<User> it is one line, and it tracks User forever:
function updateUser(id: number, changes: Partial<User>) { // changes can include any subset of User's fields}Pick and Omit are common for component props. A UserAvatar that only needs the name and id can accept Pick<User, 'id' | 'name'> instead of the whole User.
Interview Tip
The point worth saying out loud is "derive, do not duplicate." Utility types let your types follow a single source of truth. If you mention that changing User automatically updates Partial<User>, Pick<User, ...>, and the rest, you show you understand why these exist rather than just listing their names.
Why interviewers ask this
Utility types come up in any discussion of typing real data: form updates, API responses, and component props. Interviewers want to see that you keep types DRY by deriving them from a base type instead of repeating shapes. Knowing Partial, Pick, Omit, Record, and ReturnType covers the large majority of day to day TypeScript.