// Recursively mark all properties as optional. export type PartialDeep = T extends object ? { [P in keyof T]?: PartialDeep; } : T; // Mark one or more properties as optional. export type PartialSome = Pick, K> & Omit; export type WithRequired = T & { [P in K]-?: T[P] };