Top 1,000 Features Creators Resources Blog Explore Download
GitHub icon

Union Types

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

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

Read more about Union Types on the web: 1.

HTML of this page generated by Features.ts

View source

- Build the next great programming language About Acknowledgements Extensions Day 624 feedback@pldb.io