To be perfectly frank, I’ve only seen the drama on social media platforms. Outside of this one library Ive hardly seen anyone trying to fight typescript in the professional community.
I’m still using CommonJS and occasionally ESM, but I always get to integrate JSDoc for weak typing in IntelliSense. It’s like getting the (almost) juiciest part from Typescript without committing to it
Typescript is an abomination. Been writing JS just fine for 30 years without it.
Typescript is an abomination.
Why? (I’ve only used vanilla JS and jQuery.)
Not OP, but generally the arguments I’ve been told are:
Microsoft is an abomination (true).
“Don’t make me explicitly state types; it is too confusing!” Installs 20 libraries including fucking pad left to eek out basic functionality.
Strongly typed haters are right up there with curly brace haters.
I’m idealistically/philosophically committed to a Purescript Halogen front end with a Haskell Servant backend, biatch. Maybe someday I’ll get WASM in there. One thing I will not do is use TS or JS.
I’ve been writing my own render framework and component library for about a year now.
One thing I enjoy most about it is that the types are automatically inferred. There’s a lot of Typescript wrangling going on, and it gets really deep into what TS is capable of and barely capable of (polymorphic this
, dynamic return types based on input, Class
type reconstruction, mixins that influence both static and instance properties, event listeners based on event name, typed property watchers based on property name).
It’s all written in JavaScript with “JSDocs”. It’s not really JSDocs because there’s a lot of recursion that’s not possible with regular JSDocs. It’s TS type information slipped into JSDoc comments.
Ridiculously complex core Class
But that is to setup the ability to tap into inferred types. The actual code that’s written (eg: components) is fully typed check with little or no type declaration.
Declarative-style component with almost no explicit typing
The reality is, no complex piece of code should be written without some form of type checking. TS isn’t perfect and if there were something better, I’d move. Alliances are stupid. There are problems with some things that have not been, and likely will never be, fixed. But what type-checkers should do best is infer types dynamically.
The result means all my code today just runs in the browser. I don’t have to wrangle builders or compilers (bye Webpack!). At most, I use just esbuild to minify, though it’s an optional step, not a mandatory one. If I want to mess around on Codepen with my library, I can refer to a git commit directly and load the file. I don’t need npm to package and release. (CodePen Sample)