TypeScript Utility Types Reference

All TypeScript built-in utility types with signature, effect and example usage.

Searchable TypeScript utility type reference covering Partial, Required, Readonly, Record, Pick, Omit, Exclude, Extract, Parameters, ReturnType, Awaited and the string-literal utilities, each with a signature and example.

Do I need to import TypeScript utility types?

No. Utility types like Partial, Pick and ReturnType are part of the global TypeScript library, so they are available everywhere without an import. They are purely compile-time constructs and disappear from the emitted JavaScript.

A quick lookup for built-in type transforms

TypeScript ships a set of global utility types that transform existing types without rewriting them by hand — making properties optional, picking keys, filtering unions or extracting a function’s return type. This searchable reference lists each one with its signature, what it does, and a one-line example so you can find the right transform fast.

How it works

Utility types are generic type aliases that map one type to another at compile time. They fall into a few groups:

type User = { id: number; name: string; email?: string };

type Draft = Partial<User>;          // all keys optional
type Public = Omit<User, "email">;   // drop email
type Keys = keyof User;              // "id" | "name" | "email"
type Roles = Exclude<"a" | "b" | "c", "a">; // "b" | "c"
type R = ReturnType<typeof JSON.parse>;     // any

Object utilities (Partial, Required, Readonly, Pick, Omit, Record) reshape object types; union utilities (Exclude, Extract, NonNullable) filter union members; and function utilities (Parameters, ReturnType, InstanceType, Awaited) pull types out of signatures. All are global and erase to nothing at runtime.

Tips and notes

  • Combine utilities freely, e.g. Readonly<Pick<User, "id">> for a read-only id view.
  • Use ReturnType<typeof fn> and Parameters<typeof fn> to track a function’s types without duplication.
  • Awaited<T> unwraps nested promises recursively — ideal for typing the result of an async call.
  • The string utilities (Uppercase, Capitalize) work on string-literal types and power template-literal types.