|
|
|
|
|
by jasonkillian
2793 days ago
|
|
There are _some_ downsides: * Slightly more complex build workflows * Integrating with non-TypeScript libraries can be difficult depending on the quality of external typings available * Error messages can at times be slightly obtuse (especially depending upon the complexity of types used) * Learning curve of TypeScript (Certain language features can be a bit complex. For example, mapped/conditional types might seem tough for a beginner. See here for an example[0]) That said, to me, it's still a no-brainer to use TypeScript for anything beyond the most trivial of apps. The advantages it gives you have heavily outweighed the disadvantages in my experience so far. [0]: https://github.com/piotrwitek/utility-types/blob/532fe5cfcc5... |
|
"Slightly obtuse" is an understatement when dealing with `Pick` and the errors the complimenting mapped types generate. Once you throw in React and higher order components, you can get errors that are literally several console pages long - although that's usually just tsc "tracing" the error through the complex types.
[1] https://github.com/piotrwitek/utility-types/blob/532fe5cfcc5...