Closed janwirth closed 2 years ago
ts-union
and many other similar libraries derive types from constructor functions. That works for most cases. However, once you run into recursive or generic union types, you will have to jump through a lot of hoops.
This project derives constructor functions from types by using Proxies. That solves all those issues.
If you don't need generic or recursive unions, pick whichever you think has the nicer API / more features.
Thanks!
Why should I use this project over that one: https://github.com/twop/ts-union