import { VariantProps } from 'class-variance-authority'; type NonNullableProps = { [K in keyof T]-?: Exclude; }; /** * Merges all properties from CVA functions. * If there are multiple properties with the same name and different possible values, the union of the value will be a product set. * * 1. Apply `VariantProps` to all union items to get props * 2. Convert union to intersect * 3. Apply `NonNullableProps` to eliminate nulls * * @example * ``` * type NotificationVariantProps = MergeVariantProps< * | typeof notificationContentClassName * | typeof notificationIconClassName * | typeof notificationIconContainerClassName * | typeof notificationContainerClassName * >; * ``` */ export type MergeVariantProps any> = NonNullableProps<(T extends (...args: any[]) => any ? (v: VariantProps) => void : never) extends (v: infer U) => void ? U : never>; export {};