Most of the popular large JS projects have switched (or are switching) to TypeScript (or Flow for React, though they'd have used TypeScript today). So that supports the argument in favor of TypeScript.
They didn't say most developers had switched, they said most large projects have switched
Static types massively make it easier to understand new code. I can actually see the structure of the data that's getting passed around, with types.
You don't waste time writing tests that simply check if all the arguments received the right type. This is taken care of by the type checker.
Besides, the biggest benefit of types is readability.
Not all static languages give you this but the trend is pretty clear with Typescript, Swift, Kotlin etc.
Heck just getting auto-complete on an object's members.
A few layers of higher order functions / combinators and I don't remember if I have `value` or a `{ value: value }` container (like map vs flatMap). Or which stage of the curry I'm at. Oh right, I'm at foo(a, _, c) but thought I was at foo(a, b, _).
If you can't even remember the last time you've encountered a runtime error, you are by my definition writing trivial code or not writing much code at all.
Bonus if my previous usage was incorrect and I didn't notice and I end up copying that same mistake again and again!
TypeScript saves me probably 15+ minutes a day of just switching back and forth looking up what parameters are needed.
It is a one time tax to make everything I do more pleasant.
The commenter you are replying to is talking about a function of fixed-arity, with a config object with required props. Which props are required? A Typed language will tell you immediately “for free”.