I've been diving into computer engineering and something's been bugging me. Since TypeScript is basically an extension of JavaScript that offers static typing for better safety, why don't we just switch to TypeScript for everything? If it's supposed to be safer, it seems like the obvious choice, right?
5 Answers
Honestly, many developers feel they can move faster with JavaScript. They believe they can manage without static typing and the additional overhead that comes with TypeScript, even though it might lead to issues down the line.
One reason we still use JS is the sheer amount of legacy code out there. Converting all that to TypeScript isn't something many companies are willing to invest in, especially when their teams are already accustomed to JavaScript.
Not every project needs the added complexity of TypeScript. For individual scripts or simpler tasks, JavaScript allows for faster development without the verbosity of TypeScript, which can feel overly complicated at times.
Switching everything to TypeScript isn't as easy as it sounds, mainly because browsers only understand JavaScript. You have to compile your TypeScript first, which adds a layer of complexity.
For smaller projects, JavaScript often feels sufficient. Many people just want to get things done without the hassle of setting up a TypeScript compiler.
Exactly! Sometimes, a simple JSDoc comment is all you need for auto-complete functions.

True, but it seems silly to claim engineers can't handle the setup. Isn't that part of their job?