Is TypeScript worth it?
h
MocaCDeveloper

Simple question, yet seems to be very debatable from person to person.

Question

Is TypeScript worth learning. It seems to have a very clean syntax and seems to be written smoothly. It has some strong ties with JavaScript(duh).

But, I have heard from many developers that it is slow and "too much like JavaScript", and in that case many developers lean more towards JavaScript due to the fact there belief is that TypeScript is too much like JavaScript.

But, I need a straightforward answer. Is TypeScript worth learning?

I am on a learning spree. I am currently learning Rust, I am getting a little hands on with C++(I might create a game engine using C++), and I want to get into some other languages like JavaScript or TypeScript for server-side development(or whatever TypeScript is used for).

I've seen allot of interesting projects in TypeScript and I feel like it would fit my needs in some projects I want to write where in most cases I don't want to use Python(mainly because Python gets a bit boring over time, and languages like Rust, C, C++ etc would take far too long).

So, to me, TypeScript would fit in my category of a language to learn. I don't want to dive into JavaScript due to its strong bonds with Web Development.

But, I really don't know anything about TS or JS. Shoot, they could both be the absolute same thing..just different languages.

But what do you guys think? Is TS worth learning, or should I dive right into JS?

You are viewing a single comment. View All
Answered by xxpertHacker [earned 5 cycles]
View Answer
Coder100

it is very worth it.

You will be writing much better js code, it prevents you from doing things like this:

not only that, but you have access to namespaces, enums, and interfaces! All very common static language features that actually are useful.

Not only that, but you can use es6 modules without having to add type="module" -- everything is all precompiled!

Also autocomplete
Also docs
Also most editors support typescript, so you are making coding better for everyone!

Downsides

a bit verbose according to some, and not useful for anyone who doesn't even use js that much??? Also a lot of set up.

Clarification

Typescript is a superset of js, you technically aren't going to learn anything new. Also, it's not slow??? Maybe it compiles a bit slower, but using tsc -w (automatically compile on save) makes compiling almost seamless.

Because it is a superset, you may be writing better and maybe faster js code.

Final advice

guys play my bot cycle plz made in ts owo
https://github.com/cursorweb/Cycle-Bot-Game