Utility Type
In one line
Utility types are built-in TypeScript types that transform existing types in common ways: Partial, Required, Readonly, Pick, Omit, Record, and more.
In simple words
Utility types are built-in type transformations. They take an existing type and produce a new one with modified properties. They save you from writing repetitive mapped types manually.
Common utility types include: Partial<T> (all properties optional), Required<T> (all properties required), Readonly<T> (all properties readonly), Pick<T, K> (select specific properties), Omit<T, K> (remove specific properties), and Record<K, V> (create an object type with keys K and values V).
These are implemented as mapped types under the hood. Understanding them is essential for writing clean, DRY TypeScript code.
Example
interface User { id: number; name: string; email: string; }
type UserPreview = Pick<User, "id" | "name">;
type UserUpdate = Partial<User>;
type UserRecord = Record<string, User>;Pick selects properties, Partial makes all optional, Record creates a map.
Related terms
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.