DEV Community

Redas Jefisovas
Redas Jefisovas

Posted on

Things I thought I didn't need while learning web development (part 1)

TypeScript

You're finally building that dream app that's gonna make your portfolio really pop and get all the recruiters sliding into your LinkedIn DMs. JavaScript is finally clicking, and you no longer have to Google the command for starting a new React project with npm create @vite latest ...hold up...that's not right!

Of course, if you have run the correct version of the above command, you've seen the option to start the project with TypeScript. Maybe you opted in once, wrote some code, your editor started screaming at you - and you went right back to good old friendly vanilla JS. That's what I did too. But I think it was a mistake and I'm here to stop you from making the same one.

The misconception I had was thinking that TypeScript is just another library that a "real" developer can do without. It requires extra configuration, a build step, and the syntax feels weird and confusing. The code running in the browser is still just JavaScript anyway, so why bother?

That "screaming" your editor did? It wasn't just being mean, it was actually trying to save you from yourself. TypeScript will expose faulty logic and mistakes way before they get a chance to become nasty bugs at runtime. Beyond the bug prevention, the developer experience is just amazing! Being able to automatically resolve imports, instantly see a function's parameters, and get smooth autocomplete. Big oouf! Once you get used to that, regular JavaScript will feel like me trying to write this blog post without asking Gemini to "FIX THE WRITING AND MAKE NO MISTAKES!!"

After actually using TypeScript on a daily basis ever since I landed my first real job as a developer, I wish (and so do many others) that JavaScript was more like TypeScript all the time. There's plenty of articles and videos out there going through all of the benefits, so I won't try to list them all here. But the point I want to make is that when you eventually land that dream job. You're most likely going to be writing TypeScript, so just start now and you'll thank yourself later!

Top comments (2)

Collapse
 
valeriavg profile image
Valeria

Hey, where's the rest of the article?! I got excited, started reading and then a cliffhanger XD
Welcome to Dev.to!

Collapse
 
holoflash profile image
Redas Jefisovas

Ain't nobody got the attention span to read more than that :P Plus, writing is hard.
Thank you!!!