4 ms·
There are two main reasons I see types become complex: First, and most related to TypeScript, is that the library predates TypeScript and the dynamic nature of
by hamandcheese 4y ago
There are two main reasons I see types become complex:
First, and most related to TypeScript, is that the library predates TypeScript and the dynamic nature of JS made it easy to create much too complex interfaces.
Second is when a library is very frameworky rather than a less opinionated library (I see this sometimes in Sorbet types written by my colleagues, even for greenfield stuff).
Don’t want to make a value judgement on either, but it’s certainly possible to write useful libraries with simple types. Look at golang.