TypeScript 7 · Utility types and narrowing

Require or freeze properties

Make every property required, or read-only.

type Complete = Required<User>;
type Frozen = Readonly<User>;

Official TypeScript 7 documentation

More utility types and narrowing commands

All utility types and narrowing commands · TypeScript 7 cheatsheet

Was this page helpful?