Make a specific property readonly.
The object type
The key of the property to make readonly
1.1.0
Marks only one property as readonly while keeping all others mutable. Useful for enforcing immutability at the type level.
type Obj = { a: string; b: number };type Result = ReadonlyProperty< Obj, 'a' >; // { readonly a: string; b: number } Copy
type Obj = { a: string; b: number };type Result = ReadonlyProperty< Obj, 'a' >; // { readonly a: string; b: number }
Make a specific property readonly.