For me, the whole concept of TypeScript feel so much more like working productively than JS. This might change with the recent developments in ES2022 and ES2023, since many of TypeScript's loved structures (sadly not the Type System) find their way into common JS syntax.
The Typescript experience I shill here is NOT the library builder and maintainer experience. Publishing an extensible package with good TS support is hellish.
Those maintainers are a huge part of why TS is great, we owe them.
The big problem most of the time is, that most developer's dont do a complete rework of the code. They built a js to TS support. Typescript uses different Development patterns then JS. So if you try and work your types alongside with your js code, yes its super messie and hard to maintain. For example Angular and Vue did that big step with a major release and rewrote the entire framework in TS
Typescript uses different Development patterns then JS.
If that were true, we could have had a much better language to begin with … like ReScript.
Unless of course your idea of better is "web development with C#".
"TypeScript began its life as an attempt to bring traditional object-oriented types to JavaScript so that the programmers at Microsoft could bring traditional object-oriented programs to the web."
For me, the whole concept of TypeScript feel so much more like working productively than JS. This might change with the recent developments in ES2022 and ES2023, since many of TypeScript's loved structures (sadly not the Type System) find their way into common JS syntax.
That's only half the story, the perspective of the application developer.
"Publishing an extensible package with good TS support is hellish."
If you write your package in TS it's just super easy.
So writing Redux from scratch in TS would be easy?
Perhaps try it yourself and then maintain it long term to see if you can say that with a straight face.
Even maintainers of libraries written from scratch in TS report that types significantly increase their maintenance burden.
Learning and Using TypeScript as an App Dev and a Library Maintainer
The big problem most of the time is, that most developer's dont do a complete rework of the code. They built a js to TS support. Typescript uses different Development patterns then JS. So if you try and work your types alongside with your js code, yes its super messie and hard to maintain. For example Angular and Vue did that big step with a major release and rewrote the entire framework in TS
If that were true, we could have had a much better language to begin with … like ReScript.
Unless of course your idea of better is "web development with C#".
"TypeScript began its life as an attempt to bring traditional object-oriented types to JavaScript so that the programmers at Microsoft could bring traditional object-oriented programs to the web."
[TypeScript for Functional Programmers]
And yes, from the perspective of a package developer