ComponentN interface/other


It would be handy if anything that declared a component method could be used generically.

For example I want to write a function which accepts anything that can be destructured using component2(). Perhaps this exists already but I could not find a way to do it.

fun foo(component:Component2) = …

Basically need someone analogous to Scala’s ProductN traits.