Skip to main content
Version: 2.1.0

About

Variant is a project I wished existed. I love TypeScript, but I find it's discriminated unions implementation elegant in some ways and clunky in others. See the motivation page for some of the problems this library addresses.

📜 The Author

I'm Paarth. I've done a little of everything. I started using TypeScript in... 2015? 2014? I know I remember watching TypeScript get many of its major features and with each release it captured more of my time and attention. My favorite languages pre-TypeScript were OCaml and C#. I adored the expressivity of OCaml but was frustrated by its lack of a platform. As TypeScript introduced more expressive type features it gave me more of what I wanted from a statically typed functional language like OCaml but on the largest platform in the world. Yes, please. This project is my attempt at addressing one of the few major holes remaining.

I use variant in almost every project I make. It's a language feature as a library. I'm lucky enough to get to use it in my professional projects as well.

I'd like to express my sincere thanks to the users and companies using variant in their codebases every day. ❤️

Contact

I'm active on reddit. I won't be posting my username because I learn from the mistakes of others but you might see me around the TypeScript subreddit.

If you liked what you saw here and have any questions or would like to consult with me or my employer, please feel free to reach out to variant.developer@gmail.com. However, I should note that I am happily employed and will likely not pursue an opening as a Java developer with required relocation to New Jersey or similar opportunities.