Mutates the type by making all properties readonly, recursively.
readonly
The type to mutate.
type Original = { name: string; age: number }type Mutated = ReadonlyDeep<Original>; // { readonly name: string; readonly age: number } Copy
type Original = { name: string; age: number }type Mutated = ReadonlyDeep<Original>; // { readonly name: string; readonly age: number }
Mutates the type by making all properties
readonly
, recursively.