defmodule Foo
use Ash.Type.NewType,
subtype_of: :union,
constraints: [
types: [
a: [
type: TypedStructA,
tag: :type,
tag_value: "a"
],
b: [
type: TypedStructB,
tag: :type,
tag_value: "b"
],
c: [
type: TypedStructC,
tag: :type,
tag_value: "c"
]
],
]
end
defmodule Foo
use Ash.Type.NewType,
subtype_of: :union,
constraints: [
types: [
a: [
type: TypedStructA,
tag: :type,
tag_value: "a"
],
b: [
type: TypedStructB,
tag: :type,
tag_value: "b"
],
c: [
type: TypedStructC,
tag: :type,
tag_value: "c"
]
],
]
end