Two days ago, I wrote a post about JSDoc.
The post was about using JSDoc for type checking, and it received over 60 comments, including my own repl...
For further actions, you may consider blocking this person and/or reporting abuse
eheh I wrote about this 4 years ago fibo.github.io/2019/09/always-use-...
I especially like the title.
The biggest benefit of JSDoc that is currently being discussed is source maps, but it is a good article.
Your post is excellent! The only consideration that holds me back from fully embracing JSDoc is its potential impact on code quality. However, for solo development projects, JSDoc still stands out as the preferred choice
Additionally, it would be extremely helpful if you could provide the tsconfig.json code instead of an image. This would enable people to easily try it out and experience its capabilities firsthand.
In the first article of my series, there are links to relevant GitHub and Stackblitz repositories.
It doesn't really support function overloads or discriminated unions. So while JSDocs can be adequate, they do not "perform the same type checking".
That is not true.
I have added examples of how to use those features in JSDoc at the bottom of the text.
Oh, I stand super corrected. This is amazing, thank you!
You can, they just combine d.ts files with jsdoc, making their typings half typescript, half jsdoc because they want to avoid using the typescript compiler for... reasons... 😅
I mean... it's exactly the same jsdoc :B just a different syntax of how you write your types... or even more accurate, the actual type syntax is the same, just the fluff syntax around it is different (absent in typescript).
It is almost true, but there may be some differences in the developer experience when configuring a monorepo, and there are also differences in the provision of source maps when distributing a library.