TypeScriptTypeScript22 min read

TypeScript Utility Types

Master built-in utility types like Partial, Required, Pick, Omit, and Record to transform types easily.

David Miller
December 30, 2025
1.3k50

TypeScript gives tools to transform types.

    ## Base type
    ```ts
    type User = {
      id: number;
      name: string;
      email: string;
    };
    ```
    
    ## Partial
    ```ts
    type UserDraft = Partial<User>;
    ```
    
    ## Required
    ```ts
    type FullUser = Required<UserDraft>;
    ```
    
    ## Pick
    ```ts
    type UserPreview = Pick<User, "id" | "name">;
    ```
    
    ## Omit
    ```ts
    type UserNoEmail = Omit<User, "email">;
    ```
    
    ## Record
    ```ts
    type Scores = Record<string, number>;
    ```
    
    ## Graph
    ```mermaid
    flowchart TD
      A[User] --> B[Partial]
      A --> C[Pick]
      A --> D[Omit]
    ```
    
    ## Remember
    - Utility types reshape types
    - Avoid rewriting similar types
    
#TypeScript#Intermediate#Utility Types