variant
Variant types in TypeScript (by paarthenon)
ts-adt
Generate Algebraic Data Types and pattern matchers (by pfgray)
SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
surveyjs.io
featured
variant | ts-adt | |
---|---|---|
5 | 4 | |
178 | 305 | |
- | - | |
0.0 | 0.0 | |
2 months ago | about 1 year ago | |
TypeScript | TypeScript | |
Mozilla Public License 2.0 | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
variant
Posts with mentions or reviews of variant.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-10-01.
-
Building React Components Using Unions in TypeScript
Variant
-
ADTs in Typescript
When working in a TS codebase I'll lean on this variant library, which works pretty well as far as simple sum types go (v3 is great but not stable yet).
-
disc-union - (yet another) library for working with discriminated union types
About half-way through writing this library I discovered that Variant existed... and does a great job at doing the exact same things (and more). I might not have started if I knew about that, but I'm glad I did because it has been a great learning experience!
-
ts-pattern: pattern matching library for TypeScript, with smart type inference
Oddly enough, this feature alone has been a a big draw to Rust, Haskell and functional programming in general for me... so it's nice that there's libs filling the gap for TypeScript. Here's another one I haven't gotten around to trying yet either.
-
Tool to normalize types (specifically intersections)?
I had to solve this for a project of mine.
ts-adt
Posts with mentions or reviews of ts-adt.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-10-01.
-
Building React Components Using Unions in TypeScript
ts-adt
-
What makes Rust's enums so great?
FWIW, for TypeScript there are libraries such as ts-adt that help you skip over the boilerplate.
- @practical-fp/union-types - A Typescript library for creating discriminating union types
-
Rust Pattern Matching Examples for Typescript Developers
From a pattern matching perspective, Typescript is very limited in what it can do. Hence, this makes writing functional code more verbose and requires more boilerplate because you'll need to write your own matchers. See ts-adt as an example.
What are some alternatives?
When comparing variant and ts-adt you can also consider the following projects:
type-fest - A collection of essential TypeScript types
ts-pattern - 🎨 The exhaustive Pattern Matching library for TypeScript, with smart type inference.
boxed - Essential building-blocks for functional & safe TypeScript code
union-types - A Typescript library for creating discriminating union types.
TypeScript - TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
fsharp.org - The F# Software Foundation website