4 min read
TypeScript vs JSDoc: A Shift in the Development Landscape
The Svelte team believes that while types are fantastic, TypeScript as a language can be “a bit of a pain” to quote Rich Harris. The main issue lies in the additional tooling and points of friction that come with using TypeScript. For instance, if you're building a library in TypeScript and using that library in a separate project, you can't just modify the codebase and expect it to run. You would have to rebuild the code, which adds unnecessary complexity.
To be clear, this is about building Svelte, the library, and has nothing to do with how you will use Svelte as a developer. You will still be able to use Svelte with TypeScript.
The Benefits of Using JSDoc
checkJS properties set to
true in their
The Community's Response
In the end, will JSDoc replace TypeScript for type checking? Absolutely not! And if that's the question you're asking, you've missed the point.
The Decision is Yours!
Regardless of the choice, the ongoing discussion and exploration of these technologies contribute to the continuous evolution and improvement of web development practices. As developers, staying informed and open to new approaches is key to adapting and thriving in this ever-changing landscape.
Never stop learning, and never give up!
Check out the full video on my YouTube channel.
Help me out by liking this video and subscribing if you haven't already.