DEV Community

Cover image for JavaScript vs. TypeScript for Open Source: Seeking the Community's Thoughts πŸ€”
OpenSource for Webcrumbs

Posted on • Updated on

JavaScript vs. TypeScript for Open Source: Seeking the Community's Thoughts πŸ€”

Hey there, fellow devs!

We're at a crossroads with our open-source project, Webcrumbs, and would love your perspective. We're deliberating between JavaScript and TypeScript, and while we're leaning in a direction, we're curious to know the community's thoughts.

Some initial pros and cons that come to mind:

JavaScript:

Pros:

  • Widespread adoption and massive community.
  • No additional setup required.
  • Immediate browser compatibility.

Cons:

  • Dynamically typed, which can lead to potential type-related issues.
  • Might lack some advanced features for larger applications.

TypeScript:

Pros:

  • Static typing can catch potential type-related bugs during compile time.
  • Can use all of JS's features plus additional TS ones.
  • More structured, which could be beneficial for large projects.

Cons:

  • Requires a compilation step.
  • Might have a steeper learning curve for newcomers.

Which do you think would be better for Webcrumbs, considering the following features:

  • Plugin Platform: Integrate and manage React plugins to extend functionality effortlessly.
  • No-Code Admin Panel: Control every aspect of your website from a robust admin interface, no coding needed.
  • Fully Customizable: Developers can tailor Webcrumbs according to specific needs.
  • Open Source & Free: Webcrumbs is committed to being an open-source, community-driven project.

Additionally, if you believe in the project's mission, we'd love your support:

  1. Star the Repository: Show your support and help us gain more visibility by starring ⭐️ the repository. Star Webcrumbs on GitHub.
  2. Join the Discussions: Your opinions and ideas matter. Participate in ongoing discussions or start a new one. Go to Discussions.
  3. Check Open Issues: See what issues are open and where you can contribute. View Open Issues.
  4. Read the Contributing Guide: Get all the information you need about how to contribute. Read Contributing Guide.

Looking forward to your insights! πŸ’‘

Top comments (7)

Collapse
 
redbar0n profile image
Magne • Edited

I recommend either TS with types greyed out (color-wise) in the IDE (so they don't clutter reading of the JS code), or JSDoc TS. Types are especially important for OSS libraries that others use and rely on, but beware that you might have to create some complex typings from time to time (can be time consuming, hence the DHH drama), to give your API consumers the best experience.

Collapse
 
syeo66 profile image
Red Ochsenbein (he/him) • Edited

I think one point simply asks for static typing: the plugin interface. However this would still leave the question open JSDoc or Typescript. I think deployment is simpler when using JSDoc because it does not require a build step. But Typescript is probably easier to maintain than proper JSDoc (with its rather cumbersome syntax for more complex stuff)

Collapse
 
opensourcee profile image
OpenSource

Really appreciate. Cheers

Collapse
 
peerreynders profile image
peerreynders

Apart from the DHH drama I think the tension really is TS vs TS JSDoc.

See my comments here.

Collapse
 
opensourcee profile image
OpenSource

We’ll get there! Thanks, friend

Collapse
 
usulpro profile image
Oleg Proskurin

Hey!

Typescript has become almost a standard nowadays. Especially if you are providing any library that other developers will use. Moreover, the typescript cons you mentioned are not so critical, let me comment on them:

  • you will have a compilation step in any case even without a typescript
  • the learning curve is not so difficult, rather on the contrary, in my experience, new developers are more comfortable onboarding a project with a typescript

Another disadvantage of typescript that you did not mention is that if you take typing seriously, you will have to think through twice as many things on the project and this will require additional costs, of course. Now it’s up to you to decide whether it’s worth investing in it.

Happy coding! :)

Collapse
 
opensourcee profile image
OpenSource

Thank you, my friend.