What are TypeScript utility types?

Why Interviewers Ask This

Foundational questions like this help interviewers calibrate the rest of the interview. A confident, accurate answer signals that you have solid TypeScript basics — a prerequisite for any developer role.

Answer

TypeScript ships with built-in utility types that perform common type transformations. Key ones: Partial<T> — makes all properties of T optional (useful for update operations). Required<T> — makes all properties required (opposite of Partial). Readonly<T> — makes all properties readonly. Record<K, V> — creates an object type with keys of type K and values of type V. Pick<T, K> — creates a type with only the specified properties K from T. Omit<T, K> — creates a type excluding the specified properties K from T. Exclude<T, U> — removes types from T that are assignable to U. Extract<T, U> — keeps only types from T that are assignable to U. NonNullable<T> — removes null and undefined from T. ReturnType<T> — extracts the return type of a function type. Parameters<T> — extracts parameter types as a tuple. These utility types are built using TypeScript's advanced type features (mapped types, conditional types) and are essential tools for type manipulation.

Common Mistake

Candidates often give textbook answers here. Interviewers are more impressed when you relate the concept to a specific problem you solved in a real TypeScript project.