/**
 * Utility type to allow for a type to be either all of the properties of another type, or none of them
 * @example
 * type Person = { age: number } & AllOrNone<{ name: string, lastName: string }>
 * const person: Person = { age: 30 } // ok
 * const person: Person = { age: 30, name: "John" } // error, requires lastName
 * const person: Person = { age: 30, name: "John", lastName: "Doe" } // ok, all properties are present
 */
export type AllOrNone<T> = T | {
    [K in keyof T]?: never;
};
export type DeepPartial<T> = {
    [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
};
