export type ColorVariant = "accent" | "grey" | "green" | "blue" | "orange" | "red"; /** * Ensures at least one type is required * See https://stackoverflow.com/a/48244432/5903923 */ export type AtLeastOne; }> = Partial & Union[keyof Union]; /** * Makes an optional property required * See https://bobbyhadz.com/blog/typescript-make-property-required */ export type WithRequiredProperty = Type & { [Property in Key]-?: Type[Property]; }; /** * Makes two types mutually exclusive * https://stackoverflow.com/questions/42123407/does-typescript-support-mutually-exclusive-types */ type Without = { [Property in Exclude]?: never; }; export type XOR = Type | Union extends object ? (Without & Union) | (Without & Type) : Type | Union; export type SvgComponent = React.ComponentType<{ className?: string; style?: { [s: string]: any; }; }>; export {};