5 ms·
> In a large app, the types can be their own special form of spaghetti. I have a relatively neutral opinion of Typescript, but oh boy does that quote ring true
by emilecantin 6y ago
> In a large app, the types can be their own special form of spaghetti.
I have a relatively neutral opinion of Typescript, but oh boy does that quote ring true. TS can be a very nice safety net when refactoring (just fix all the type errors, and the app should mostly work as it did before), but you can also very well paint yourself in a corner with similar-but-slightly-different types all over the place that'd just work if it was in JS.
- stank345 6y agoYeah, agreed, but it's nice that it gives you the flexibility to be able to throw a `// @ts-ignore` in there and tell the compiler not to worry about it. I've definitely done that when consuming wonky libraries with messed up type definitions.