/** * If a key is in both objects passed to this type, it will be required in the resulting type. * * @example * // Will equal { foo: string } * PartialRequired<{ foo: string, bar: number }, { foo: string}> */ export type PartialRequired = { [key in keyof T]?: T[key]; } & { [key in Required]: T[key]; }; export type AnyRecord = Record; export type AnyArray = any[]; export type EmptyObject = {}; export type Unsubscribe = (reason?: Error) => void;