Recursively remove readonly and optional modifiers.
Readonly object type to transform
Produces a fully mutable and required version of a deeply readonly type.
Will keep functions and special types like Date unchanged.
type User = { readonly id?: number; profile?: { readonly name?: string; address?: { readonly city?: string }} };type Mutable = DeepMutable< User >;// { id: number; profile: { name: string; address: { city: string } } } Copy
type User = { readonly id?: number; profile?: { readonly name?: string; address?: { readonly city?: string }} };type Mutable = DeepMutable< User >;// { id: number; profile: { name: string; address: { city: string } } }
Recursively remove readonly and optional modifiers.