/** * TypeScript type to return a deep partial object (each property can be undefined, recursively.) * @deprecated - This type will hit infinite type instantiation recursion. Please use {@link DeepPartialV2} */ export type DeepPartial = { [P in keyof T]?: T[P] extends Array ? Array> : T[P] extends object ? DeepPartial : T[P]; }; interface IDeepPartialArray extends Array> { } type DeepPartialObject = { [Key in keyof T]?: DeepPartialV2; }; export type DeepPartialV2 = T extends Function ? T : T extends Array ? IDeepPartialArray : T extends object ? DeepPartialObject : T; export {};