Top 1,000 Features Creators Events Podcasts Extensions Interviews Blog Explorer CSV

Union Types

< >
Example from 1 languages: TypeScript
declare type numOrString = string | number
Example from 1 languages: GraphQL
union SearchResult = Human | Droid | Starship
Example from 1 languages: C3
union Foo { int x; float f; struct { char[2] z; } }
*

Languages with Union Types include TypeScript, GraphQL, C3, C2

*

View all concepts with or missing a hasUnionTypes measurement

*

Read more about Union Types on the web: 1.

View source

- Build the next great programming language About Resources Acknowledgements Part of the World Wide Scroll