Closed podhmo closed 1 year ago
type I interface { I()}
func (x X) I(){}
func (y Y) I(){}
func (z Z)I(){}
I := b.Union("I", X, Y, Z)
b.Type(b.Field("X", "*X"), b.Field("Y","*Y"), b.Field("Z", "*Z")).Constructor(b.Arg("args", "I").Variadic().BindFields("X","Y","Z").Transform(...))
e.g.
I = X | Y | Z