Recursively make all properties optional.
Object type to transform
Traverses objects and arrays and applies optional modifiers at every nesting level without altering value types.
type User = { id: number; profile: { name: string; address: { city: string } } };type PartialUser = DeepPartial< User >;// { id?: number; profile?: { name?: string; address?: { city?: string } } } Copy
type User = { id: number; profile: { name: string; address: { city: string } } };type PartialUser = DeepPartial< User >;// { id?: number; profile?: { name?: string; address?: { city?: string } } }
Recursively make all properties optional.