DEV Community

Discussion on: To Typescript Or Not To?

Collapse
 
joelbonetr profile image
JoelBonetR 🥇 • Edited

It's a copy paste (explained in the thread), long story short, and as a TLDR I'm not against TS, I was playing a "I'm against that" and see how the thread evolves. It contains very good answers! Check them out.

In fact I'm encouraging people on adopting certain practices to deliver better code Like in this post.

I understand why most [Java, C#, ...] devs experience some kind of rejection about non-typed code (I worked 4 years or so with those as well), but From a reallistic point of view the major part of JS devs or JS projects will not jump to TS because the use-case does not provide enough pros for the cons (I'm talking about business software), -you can check how many available open positions ere there in Linkedin for both JS and TS- nor is TS a tech to rule them all, but knowing the pros of it can help when it's necessary or best to use it and what can better be solved with proprtypes, TS-Pragma + JSDoc and so on.

Sooner or later I'll recap all those ideas or statements against or in favour of TS in a single post (It's taking me some time 😅)

Cheers!

Thread Thread
 
codingjlu profile image
codingjlu

Okay. I didn't express any opinion previously, so I'm not sure what you mean exactly when you talk about all that, but now that I have the opportunity: I really don't like TypeScript because first, (okay, I know this is cringy) it's made by Microsoft (no, I don't use VSCode for my serious projects). Besides that, it's a lot of extra code (and time) you have to write, and often it gets very frustrating messing with types and the such. Also it's just annoying to have to go through another compilation stage to run code. People say Typescript is self-documenting when you read it, but to me it's self-destructing. The syntax just complicates everything and I don't often encounter problems with types of anything. If you want self-documenting, just stick with JSDoc, where there's actually documentation. Why, you can just read the comments!

I'm fine with plain JS. TypeScript doesn't seem to offer me substantial benefits, and where the real bugs are, TypeScript would not solve the problem. So, no to TypeScript.