Yep, when I hear people say things like "I like $dynamic_language because I don't have to think about what types I'm supposed to put when I write my functions" or similar, I'm just thinking "how the hell can you write a function without knowing what types you want to receive and return?". I do love the "productivity benefits" of having to read entire function bodies to reverse-engineer what types I'm supposed to pass, because the docstring just used vague terms like "file" or "user"
I find that areas that are hard to type are a code smell indicating potentially unstable API design. It can be pretty tricky adding types to a JavaScript project as the lack of types can lead to some very side effecty apis that can be very difficult or impossible to add full type safety to.
My impression is that people running into these problems are trying to add declaration files to JavaScript code, but if you use typescript throughout I've not run into these problems.
Anything I find hard to type is simply a hard problem to solve in the first place and the type system helps me rethink the problem to find safer and more elegant API designs.
Learn to program [at a high level]. Which means being able to write code with a type checker in a way that makes you faster not slower at producing high quality, maintainable programs.
any (concept not keyword) is useful when you NPM install something without types and just do a define module in a local .d.ts. You are implicitly any-ifying that package.
Years of experience don't mean much, if you just repeat the same thing over and over again and aren't willing to learn new things and reevaluate your workflows.
I have seen people with decades of experience who remained stuck doing things the same way they first learned to do them and refusing to adapt.
What languages have you written for 30 years? and what about TypeScript is so challenging for you? Especially if you’ve already spent time with other statically typed languages.