Extracting Tags from a Union of Tagged Structs

Is there a way to pull out the list of _tags from a union of tagged structs?

const Events = Schema.Union(Schema.TaggedStruct("Foo", {}), Schema.TaggedStruct("Bar", {}))

const getTags = (events: Events): Array<"Foo" | "Bar"> => { ... }
Was this page helpful?