3 ms·
For me TypeScript is something that you need when you want to solve a big problem with constrained typed code. I have written way too much JavaScript in my care
by tmm84 4y ago
For me TypeScript is something that you need when you want to solve a big problem with constrained typed code. I have written way too much JavaScript in my career that I know what is going on and sometimes the types given for libraries and frameworks just are wrong, out of sync or just get in the way of doing stuff. When writing regular JS I would just make a comment that if the reader hadn't seen this before what is going on but with TS I am denied that behavior and instead restricted to some type someone wrote and TS complaining that I am not doing the thing the way someone defined it as (why aren't you coding like this? I specifically requested it!).
Essentially, TS feels like training wheels for small codebases and red tape for large codebases. I do feel it helps for large codebases where someone might not be familiar with everything but reading the code works way better than types. If someone can not understand the code then that means: 1) it is not documented correctly, 2) the person needs more instruction/tutelage, 3) it is probably incorrectly implemented or 4) something more clever.