DeepPartial
Hace todas las propiedades de un objeto opcionales recursivamente.
#types
#typescript
#utility-type
export type DeepPartial<T> = { [K in keyof T]?: T[K] extends object ? DeepPartial<T[K]> : T[K];};
// Usagetype User = { name: string; address: { city: string; zip: number; };};
type PartialUser = DeepPartial<User>;// {// name?: string;// address?: {// city?: string;// zip?: number;// };// }