TypeScript 7 · Utility types and narrowing

Make all properties optional

Create a type where every property of User is optional, handy for update payloads.

type UserUpdate = Partial<User>;

Official TypeScript 7 documentation

More utility types and narrowing commands

All utility types and narrowing commands · TypeScript 7 cheatsheet

Was this page helpful?