Utility types are built-in generic types that transform existing types, so you derive new types instead of redefining them. They keep types DRY and in sync with their source.
ts
{ : ; : ; : ; : ; }
<>;
<>;
<>;
<, | >;
<, >;
// Update endpoint: accept any subset of fields
function update(id: number, changes: Partial<User>) { ... }
update(1, { name: "New" }); // ✅ only the fields you change
// Create endpoint: everything except the server-generated id
type CreateUser = Omit<User, "id">;
If you add a field to User, all of these update automatically — no second definition to forget.
Record<string, number>; // { [key: string]: number } — dictionaries
ReturnType<typeof fn>; // the return type of a function
Parameters<typeof fn>; // tuple of a function's parameter types
NonNullable<string | null>; // string (strips null/undefined)
Extract<T, U>; Exclude<T, U>; // filter members of a union
Utility types let you express relationships between types ("the create form is the user minus the id") declaratively.
They reduce duplication, keep derived types automatically consistent with their source, and are everywhere in real codebases — especially Partial for updates, Omit/Pick for DTOs, and Record for maps.