Skip to main content
Brave Programmer Logo

BraveProgrammer

BraveProgrammer

HomeProjectsBlogsCoursesLessonsAbout

Site footer

BraveProgrammer

Free coding courses, practical tutorials, and real projects from BraveProgrammer. Learn web development with React, Next.js, and TypeScript.

Navigation

  • Home
  • Projects
  • Blogs
  • Courses

Resources

  • About
  • Lessons
  • Teach on BraveProgrammer

© 2026 BraveProgrammer. All rights reserved.

Utility Types – `Partial`, `Pick | TypeScript Mastery lesson | BraveProgrammer
  1. Courses
  2. /
  3. TypeScript Mastery

Lesson 13 of 56

·Typescript

Utility Types – `Partial`, `Pick`, `Omit`, `Readonly`

15 minutes

Course progress23%

The Standard Library Utility Types

Partial<T> – make all properties optional

type User = { id: number; name: string; };
type UserUpdate = Partial<>;
User

Pick<T, K> – select a subset of keys

type UserName = Pick<User, "name">; // { name: string }

Omit<T, K> – remove keys from a type

type UserNoId = Omit<User, "id">; // { name: string }

Readonly<T> – all properties become read‑only

type ReadonlyUser = Readonly<User>;
// readonly id: number; readonly name: string;

NonNullable<T> – exclude null and undefined

type MaybeString = string | null | undefined;
type DefinitelyString = NonNullable<MaybeString>; // string

Info

Utility types are building blocks for type composition. Combine them to express complex shapes without reinventing the wheel.
Make it stickPractice what you've learned1 quiz · 3 practical tests · Optional activities from TypeScript MasteryBrowse activities
Previous lessonConditional TypesContinue to lesson 14Type Guards & Discriminated UnionsBack to TypeScript Mastery curriculum