union-types
A Typescript library for creating discriminating union types. (by practical-fp)
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
union-types | ts-adt | |
---|---|---|
5 | 4 | |
67 | 305 | |
- | - | |
0.0 | 0.0 | |
about 2 years ago | about 1 year ago | |
TypeScript | TypeScript | |
MIT License | 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.
union-types
Posts with mentions or reviews of union-types.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2021-06-06.
-
What makes Rust's enums so great?
variant and @practical-fp/union-types can get rid of that boilerplate as well. Disclaimer: I am the author of the latter.
-
Generic Object Type with similar parameters in TypeScript?
That's called a discriminating union type. I've made a small library to make discriminating unions easier to use. There also plenty of other excellent libraries like variant.
-
Help mapping JSON string to types
I've written a small library to get rid of most of the boilerplate required to use this pattern. It's however not the only library which does that. Also have a look at variant.
- @practical-fp/union-types - A Typescript library for creating discriminating union types
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 union-types and ts-adt you can also consider the following projects:
ts-pattern - 🎨 The exhaustive Pattern Matching library for TypeScript, with smart type inference.
io-ts - Runtime type system for IO decoding/encoding
fsharp.org - The F# Software Foundation website