TypeScript Utility Types
A searchable reference of TypeScript utility types and what each one produces.
| Type | What it does |
|---|---|
Partial<T> | Makes every property of T optional. Partial<{ id: number; name: string }> becomes { id?: number; name?: string }. |
Required<T> | Makes every property of T required, the opposite of Partial. Required<{ id?: number }> becomes { id: number }. |
Readonly<T> | Makes every property of T read-only so it cannot be reassigned. Readonly<User> blocks user.id = 2. |
Record<K, V> | Builds an object type with keys K and values V. Record<string, number> maps string keys to number values. |
Pick<T, K> | Keeps only the listed keys K from T. Pick<User, "id"> keeps only the id property. |
Omit<T, K> | Removes the listed keys K from T. Omit<User, "password"> keeps every property except password. |
Exclude<T, U> | Removes from union T the members assignable to U. Exclude<"a" | "b" | "c", "a"> gives "b" | "c". |
Extract<T, U> | Keeps from union T only the members assignable to U. Extract<string | number, number> gives number. |
NonNullable<T> | Removes null and undefined from T. NonNullable<string | null | undefined> gives string. |
Parameters<T> | Gets the parameter types of a function type as a tuple. Parameters<(a: number, b: string) => void> is [number, string]. |
ReturnType<T> | Gets the return type of a function type. ReturnType<() => number> is number. |
ConstructorParameters<T> | Gets the argument types of a class constructor as a tuple. ConstructorParameters<typeof Point> is the tuple new Point(...) expects. |
InstanceType<T> | Gets the instance type a constructor returns. InstanceType<typeof Date> is Date. |
ThisParameterType<T> | Extracts the type of the this parameter of a function, or unknown if it has none. For function f(this: Window) it is Window. |
OmitThisParameter<T> | Removes the this parameter from a function type, leaving the rest of the signature. Useful after binding this. |
Awaited<T> | Unwraps the value a Promise resolves to, recursively. Awaited<Promise<string>> is string. |
Uppercase<S> | Converts a string literal type to upper case. Uppercase<"abc"> is "ABC". |
Lowercase<S> | Converts a string literal type to lower case. Lowercase<"ABC"> is "abc". |
Capitalize<S> | Upper-cases the first character of a string literal type. Capitalize<"hello"> is "Hello". |
Uncapitalize<S> | Lower-cases the first character of a string literal type. Uncapitalize<"Hello"> is "hello". |
keyof | Produces a union of the property names of a type. keyof { id: number; name: string } is "id" | "name". |
typeof | In a type position, takes the static type of a runtime value. typeof myObj gives the inferred type of that value. |
as const | Freezes a literal into its narrowest read-only type. { role: "admin" } as const makes role the literal "admin", not string. |
in operator | Used in a mapped type to loop over a union of keys. [K in keyof T] visits every key of T. |
T[K] (indexed access) | Looks up the type of a property by key. User["id"] is the type of the id property. |
T extends U ? X : Y | Conditional type that chooses X or Y based on whether T is assignable to U. number extends string ? A : B resolves to B. |
infer | Captures a type inside a conditional type. In T extends Array<infer E> ? E : never, infer E grabs the element type. |
mapped type | Builds a new object type by transforming each key of another. { [K in keyof T]: boolean } makes every property a boolean. |
template literal type | Builds string literal types by interpolation. `id_${number}` matches strings like id_1 and id_2. |
satisfies operator | Checks a value matches a type without widening it. const cfg = { port: 3000 } satisfies Record<string, number> keeps the exact shape. |
const type parameter | Infers the narrowest literal type for a generic argument. function f<const T>(x: T) preserves tuple and literal types. |
readonly modifier | Marks arrays, tuples, or properties as immutable. readonly number[] is an array you cannot push to. |
No types match your search.
Runs entirely in your browser. Nothing you type is sent anywhere; open DevTools and watch the Network tab to verify zero requests.
What this tool does
This is a searchable quick reference for TypeScript utility types and the type-level operators you reach for when modeling data. Each row pairs the type with a plain-English note on what it produces and a tiny example. Type in the filter box to search across both columns, or tap a category button to focus on one family such as object types or string types. The whole list is built into the page, so it works offline and sends nothing anywhere.
How to use it
Start typing in the Filter box. Entering pick surfaces
Pick<T, K> and its opposite Omit<T, K>; entering
keyof jumps to the key operators; entering return shows
ReturnType<T>. The category buttons (Object types,
Union types, Function types, String types, Keywords) narrow the table to one family and
combine with the text filter, so you can pick Keywords and type infer to zero
in on conditional-type inference. Clear the box to see the full list again.
Common use cases
- Recalling exactly what
Partial<T>orRequired<T>does before you use it. - Choosing between
Pick<T, K>andOmit<T, K>when narrowing an interface. - Looking up the string manipulation types like
Uppercase<S>for use inside template literal types. - Reminding yourself how
keyof, indexed accessT[K], andinferfit together. - Reviewing the built-in utility types before a TypeScript interview or code review.
Common pitfalls
- Confusing Exclude and Extract.
Exclude<T, U>removes the union members assignable to U, whileExtract<T, U>keeps only those members. They read as near-opposites, so check which direction you want. - Expecting Partial to be deep.
Partial<T>only makes the top-level properties optional; nested objects stay required. For deep optionality you need a recursive mapped type of your own. - Passing a key that does not exist.
Pick<T, K>andOmit<T, K>constrain K to the real keys of T, so a mistyped key name is a compile error rather than a silent no-op. - Reaching for an interface when a mapped type fits. Some shapes are far
shorter as
Record<K, V>or a mapped type like{ [K in keyof T]: V }instead of repeating each property by hand.
Frequently asked questions
- What is a TypeScript utility type?
- A utility type is a built-in generic that transforms one type into another without you writing the transformation by hand. TypeScript ships a set of them, such as Partial, Pick, Omit, and ReturnType, that cover common tasks like making properties optional or reading a function return type. They are pure type-level tools: they exist only during type checking and produce no JavaScript at runtime.
- What is the difference between Pick and Omit?
- Both narrow an object type by its keys, but from opposite directions. Pick<T, K> keeps only the keys you list, so Pick<User, "id" | "name"> yields an object with just id and name. Omit<T, K> does the reverse and drops the keys you list, so Omit<User, "password"> keeps everything except password. Reach for Pick when you want a small subset and Omit when you want everything but a few fields.
- What does Partial do?
- Partial<T> makes every property of T optional by adding a question mark to each one. For example, Partial<{ id: number; name: string }> becomes { id?: number; name?: string }, which is handy for update functions that accept only the fields being changed. Note that it is shallow: nested objects keep their original required properties unless you map them yourself.
- What is keyof?
- keyof is an operator that takes a type and produces a union of its property names as string or number literal types. For an object type { id: number; name: string }, keyof gives the union "id" | "name". It pairs naturally with indexed access, so T[keyof T] is the union of all property value types, and it is the backbone of generic helpers like Pick and Record.
- When should I use Record?
- Record<K, V> builds an object type whose keys are K and whose values are all V, which is cleaner than writing an index signature by hand. Use it for dictionaries and lookups, such as Record<string, number> for a counts map or Record<"light" | "dark", Theme> to require an entry for each named key. When the keys are a finite union, Record also forces you to supply every one, catching missing cases at compile time.
- What is the difference between Exclude and Extract?
- Both filter a union type against another type. Exclude<T, U> removes the members of T that are assignable to U, so Exclude<"a" | "b" | "c", "a"> gives "b" | "c". Extract<T, U> keeps only the members that are assignable to U, so Extract<string | number, number> gives number. NonNullable<T> is a common special case, equivalent to Exclude<T, null | undefined>.
- Does this tool send my type searches anywhere?
- No. The entire list of utility types is baked into the page, and all filtering happens locally in your browser with JavaScript, so nothing you type leaves your device. Open your browser DevTools and watch the Network tab while you search to confirm there are zero requests.
Cite this tool
For academic, journalistic, or technical references. Pick a format:
Citations use 2026 as the publication year. Access date is left as a fillable placeholder where the citation style expects one.