Readonly<T>

The utility type that marks every top-level property of T as readonly.

In more detail

Readonly<Pick<UserEntity, "id" | "email">> gives a public profile that cannot be changed by mistake. Like the readonly modifier it is shallow and checked only at compile time.

Related terms

Taught in

References