Typescript Utility Types
December 23, 2025
In this post, Let's talk about utility types in Typescript, what exactly are they anyway?. Utility types are a set of generic types provided by TypeScript that perform certain operations on types
Aight, here are some utility types that are commonly used in Typescript:
Partial<Type>
What this does is it converts all properties of a type to be optional. This is useful when you want to update only a few properties of an object.
Required<Type>
This is just the opposite of Partial, it essentially makes all of our properties required.
ReadOnly<Type>
This makes the properties of a type readonly, meaning we can't reassign them after initial declaraction
Record<Keys, Type>
Creates a type that maps a set of property keys (Keys) to a single value type (Type). It’s commonly used when you want multiple properties to share the same type.
Pick<Type, Keys>
This creates a new type by selecting a subset of properties Keys from Type
Omit<Type, Keys>
This is the opposite of Pick Type which creates a new type by removing properties Keys from Type.
Exclude<T, U>
Creates a type by removing members of union U from union T.
Extract<T, U>
This creates a type by keeping only the members of union T that are assignable to union U.
NonNullable<T>
This will create a type by excluding null and undefined from T
Parameters<T>
This utility type xtracts the parameter types of a function type T as a tuple.
Conclusion
Typescript utility types are powerful tools that help you transform and reuse built-in types instead of creating them from scratch. By utilizing all the utility types above, you can model real-world data more accurately while keeping your codebase clean and maintainable.
They are useful especially in large applications like when dealing with API responses, form states, updates, and shared domain models by reducing duplication and making your intent clearer to both TypeScript and other developers. Understanding when and how to use these utility types will not only improve type safety, but also make your TypeScript code easier to scale and reason about.