Comment by devjab
3 years ago
You can achieve the same thing TS does with JSDoc, it's just a lot harder to control it across teams. TS wouldn't be very useful on its own for our usage, but once you couple ESlint with TSconfig and setup your ourganisationwide vsc .settings for TS usesage you can really control the flow of how every developer on your team works with TS. I'm not sure JSDoc has the equivalent to @typescript-plugin rulesets for linting purposes, or if you can build the rules directly into your CI pipeline in a way that prevents rulebreakers from comitting their code.
Aside from that, it's a little different to work with JSDoc. It doesn't have quite the same intellisense integration in VSC. It's also a little different for many developers who aren't necessarily used to writing their documentation first or along with their code, but are used to working with things like C#, Java or similar.
If you want to put in the effort, you can likely setup a JSDoc dev environment for JS where you're getting the benefits of TS without the compiling. I don't see us doing it any time soon, but as someone who's very fond of TS I also wouldn't be surprised if we won't be using it for JavaScript in 5 years.
No comments yet
Contribute on Hacker News ↗