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.
Will keep functions and special types like Date unchanged.
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.