type DeepPartial = T extends object ? { [P in keyof T]?: DeepPartial; } : T; interface User { id: number; name: string; address: { street: string; city: string; zip?: string; }; contact?: { email: string; phone: string; }; } // Example Usage: type PartialUserUpdate = DeepPartial; const userUpdate: PartialUserUpdate = { name: "Jane Doe", address: { city: "New York", }, }; const emptyUpdate: PartialUserUpdate = {}; // Valid