I had the same views on code prettiers. I thought, aligning your code by hand makes you think about the structure. That you'd invest more time in making your code readable and thus it would be more readable.
When I first got to use prettier on a team and accepted it's value, the benefits I perceived were so vast, that my arguments seemed irrelevant in comparison.
[0]: https://www.typescriptlang.org/docs/handbook/type-inference....
at least once you want to do anything meaningful with that x
You can also generate API types based on your backend.
Another point: You can create types for your API client programatically, meaning your front-end can be aware of exactly what types your backend is returning. This cannot be accomplished with intellisense.
As you declared in your own comment, TypeScript is great for reading, hard for writing. I don't know about you, but my code is read several times more often, and by different people, than written. TypeScript is a no-brainer, time-saving wise.
I disagree that it's wasted time. The time spent investigating how a piece of code works is time extremely well spent.
If the code is too difficult to understand — of course one can hind behind types.
So, yeah, to sum it up — I think types are an overhead for a well written piece of code.
That being said, I do like inspecting the source from time to understand it better, or make up for missing documentation. Sometimes though, with this being JS, I wish that I could unsee the things that I've seen, code that production depends upon, deep within the dependency tree.
I agree with the idea of fluency when writing without types, but for me it's not about how fast you can write code. Code for me is a lot of rereading and understanding what the hell you wrote just a few days ago, I find typed code easier to get back into and it's faster to find things that broke in parts of the codebase that you're less familiar with when you change something.
Why don't exhaustive matches, unions, and data modelling not get mentioned more often? That's where the true strength lies.
It's a glorified way to put "slowing you down". When you go to your root store key and think about a better name, a single rename action traces all the usages _safely_ down throughout the whole codebase, across packages in a workspace; now compare that with the manual process. No, search & replace doesn't come close to this convenience. Having this kind of refactoring ability at hand makes you speedier, flexible, adaptive, exploring new ideas, and it makes work fun - these in fact makes one a better developer.
That was the center of reservations against TS until I figured out that it's the wrong way of using it. Normally you very rarely have primitive type annotations, or any kind of obvious things, because that's inferable.
Obvious things may not look obvious from other programmers or for yourself sometime in the future or from a code you'd written while feeling asleep.
If you'd totally think that's an obvious overhead, just give it "any". Though I never use it.
Automatic type mismatch warning and auto completion in the editor feels quite worth the little "documentation" static typing effort.
Of course, if anyone is using some basic editors that don't even highlight TS errors in real time, then it feels like a complete waste of time.
Too much overhead for me. I really dislike typing obvious things and boilerplate. Probably my fluency with JS is to blame. I don't need to see types and autocompletion. If I really need to — I just go to the source and inspect the source code, that is how I familiarise myself with the interface. I also think this makes one a better developer.