is there a way to redefine the same class or inter...
# announcements
c
is there a way to redefine the same class or interface multiple times with only its amount of generic types differing
Copy code
interface Event<out TS> { ... }
interface Event<out TS, out T0> { ... }
interface Event<out TS, out T0, out T1> { ... }
k
I’m curious, what is your use case?
You can make your interface implement another common interface?
Copy code
interface E
interface EventA<out TS> : E
interface EventB<out TS, out T0> : E
interface EventC<out TS, out T0, out T1> : E
Depends on what you are trying to do.
c
Think I got it pretty sorted now. But was trying to make something similar to events in C#. Decided to just allow 1 arg since data classes make it easy to make something to hold more if I need more then one
l
Not that I know of, no
I think you must create one version for each possibility. I did that in the past
#CDAAS8CUW does that the same way