TypeScript provides several built-in utility types that make type manipulation easier. Some of the most commonly used utility types include Partial
, Required
, Pick
, and Omit
.
type PartialPoint = Partial<Point>; // All properties of Point are optional
type RequiredCircle = Required<Circle>; // All properties of Circle are required
type PointX = Pick<Point, 'x'>; // Only the 'x' property of Point
type CircleWithoutCenter = Omit<Circle, 'center'>; // All properties of Circle except 'center'