TypeScript · Types that pay for themselves

Which utility types do you use most and why?

Mediumutility-typestype-derivationapi-designUpdated Oct 2026
Quiz this track

Short answer

Utility types such as Partial, Pick, Omit, Record and ReturnType derive new types from existing ones. They reduce duplication and keep related types in sync.

Utility types are generic type transformations shipped with TypeScript. They are not runtime helpers. Their value is that a single source type can produce the shapes needed for create, update, preview and lookup operations without copy-pasting property lists.

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

type UserPreview = Pick<User, "id" | "name">;
type UserUpdate = Partial<Omit<User, "id">>;
type UserMap = Record<string, User>;
type UserKeys = keyof User;

The ones worth knowing

  • Partial and Required adjust optionality
  • Pick and Omit select or remove properties
  • Record builds a map from a key union
  • ReturnType and Parameters extract function types
  • Awaited unwraps nested promises
  • Readonly makes properties readonly at the type level

Most utility types are shallow. Partial<User> makes the top-level properties optional, but a nested object keeps its own required properties. For deep transformations you need a recursive mapped type, and those are worth adding only when the duplication is real.

Deriving types from a single source reduces drift, but it can also hide intent. If a type is meant to be independent of the source, define it explicitly instead of deriving it.

Follow-ups you should expect

Interviewers use these to check whether the first answer was understanding or memorisation.

  1. 1What is the difference between Pick and Omit?
  2. 2Are utility types deep or shallow?
  3. 3When would you use Record instead of an interface?
  4. 4How does ReturnType extract a return type?

Say it in the interview

Utility types derive new types from existing ones, so I do not duplicate shapes. Partial and Required adjust optionality, Pick and Omit select properties, Record builds a map, and ReturnType extracts a function's result. I use them at API boundaries to keep request and response types in sync. Most are shallow, so nested objects may need their own utility.

Use this as a model, not a script. Saying it in your own words is what makes it survive follow-up pressure.

Related questions

Reading is step one

Now say it out loud.

Understanding an answer and delivering it under pressure are different skills. Rehearse this topic in a live TypeScript mock interview and get scored feedback on depth, clarity and confidence.