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>andParameters<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.