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. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

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.

The four families of utility types

Object-reshaping utilities

These take an object type and return a modified object type:

UtilityWhat it does
Partial<T>Makes every property of T optional
Required<T>Makes every property of T required (removes ?)
Readonly<T>Makes every property of T readonly
Pick<T, K>Keeps only the listed keys K from T
Omit<T, K>Keeps everything from T except the listed keys K
Record<K, V>Constructs an object type with keys K and value type V

Union-filtering utilities

These operate on union types, not object types:

UtilityWhat it does
Exclude<T, U>Removes from T the members assignable to U
Extract<T, U>Keeps from T only the members assignable to U
NonNullable<T>Removes null and undefined from T

Function-introspecting utilities

These extract type information from function signatures:

UtilityWhat it does
ReturnType<T>Extracts the return type of function type T
Parameters<T>Extracts the parameter types of T as a tuple
InstanceType<T>Extracts the instance type of a constructor type T

Promise and async

  • Awaited<T> — recursively unwraps promise types, so Awaited<Promise<Promise<string>>> is string.

String-literal utilities

Uppercase<S>, Lowercase<S>, Capitalize<S>, Uncapitalize<S> transform string-literal types. Primarily useful inside template-literal types for generating mapped key names.

How it works

Utility types are generic type aliases that map one type to another at compile time — they are purely a TypeScript construct and produce no JavaScript output. Search or filter the reference to find the one you need, then copy the pattern into your own type alias.

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

type Draft   = Partial<User>;              // all keys optional
type Public  = Omit<User, "email">;        // drop email
type Names   = Exclude<"a" | "b" | "c", "a">;  // "b" | "c"
type Ret     = ReturnType<typeof JSON.parse>;    // any

Composition patterns

Utilities compose cleanly:

type ReadonlyPublic = Readonly<Omit<User, "email">>;
type FnArgs = Parameters<typeof fetch>;   // [input: RequestInfo, init?: RequestInit]
type Resolved = Awaited<ReturnType<typeof fetchUser>>;

Tips and notes

  • All utility types are global — no import needed.
  • 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.
  • Pick is an allow-list; Omit is a deny-list. Use Pick when you know exactly which keys you want; use Omit when you know which ones to exclude.