Open
Description
tl;dr Non-primitive types in unions are not currently supported, instead please extract the type that is not supported into a separate type replace it with the type alias name:
// before:
type SomeUnion = string | { name: string; id: number }
// after:
type User = { name: string; id: number }
type SomeUnion = string | User
This is not impossible, but would require either an unstable hack or type definition duplication. Both are cumbersome to support for the end user. As far as the workaround is trivial and provides bullet proof readability and stability, for now we go with it.