Category "union-types"

How to map nested freezed union classes to drift/moor sql tables?

I need to save this Objects into a SQL/Drift DB, how can/should I design die Tables/Rows for an efficient mapping? Here is are examples of a (deep)nested union

Type discrimination based on *any* element of an array (not *all* elements)

I would like to create a union type in TypeScript that can use an array as a discriminant, but have a specific type match if any element of the array meets some