Utility types

Utility types are generic types provided by TypeScript to transform an existing type: Partial makes properties optional, Required makes them mandatory, Pick and Omit select or remove some, Record builds an object with given keys, Readonly freezes them. They avoid redefining similar types.

Example

type Brouillon = Partial<Utilisateur>;
type Public = Omit<Utilisateur, 'email'>;

Related concepts

The whole glossary