There might be an edge case when combining S.union with S.array so it would be great to extend the test cases to check for this.
e.g. a code snippet from my current project:
export const Root = S.union({ RawInlineCategoryItem, RawItems: S.array(RawItem) })
export type Root = RawInlineCategoryItem | RawItem[]