Deep mutable (remove readonly and optional recursively)
type User = { readonly id?: number; profile?: { readonly name?: string; address?: { readonly city?: string; readonly zip?: number } } };type MutableUser = DeepMutable<User>;// { id: number; profile: { name: string; address: { city: string; zip: number } } } Copy
type User = { readonly id?: number; profile?: { readonly name?: string; address?: { readonly city?: string; readonly zip?: number } } };type MutableUser = DeepMutable<User>;// { id: number; profile: { name: string; address: { city: string; zip: number } } }
Deep mutable (remove readonly and optional recursively)