}
// mind = blown
+// https://stackoverflow.com/questions/50374908/transform-union-type-to-intersection-type
type UnionToIntersection<U> = (U extends any
? (k: U) => void
: never) extends ((k: infer I) => void)
? UnionToIntersection<U extends ComponentConstructor<infer V> ? V : never>
: never
-function mixins<T extends ComponentConstructor[], V = ExtractInstance<T>>(
- ...args: T
-): ComponentConstructor<V>
-function mixins(...args: any[]): any {
+export function mixins<
+ T extends ComponentConstructor[],
+ V = ExtractInstance<T>
+>(...args: T): ComponentConstructor<V>
+export function mixins(...args: any[]): any {
// TODO
}