Hey sorry I just saw this notification! Yes, there are quite a few very good reasons to use TypeScript (and, like any tech, a drawback or two). The main Codecademy site’s codebase was converted to TypeScript in 2019, and we’re working on a TypeScript course for later this year.
let myName = "irlfede";
It’s technically valid JS but TypeScript would tell you that
toUppercase() is a typo.
TypeScript also lets you define the expected shapes of your variables, class members, function parameters, and so on - which is very useful as your code gets larger over time. If you’re, say, calling a function from an npm package that takes in a complex object as an argument, TypeScript will tell you in your editor what the allowed fields are named & supposed to be, and it’ll yell at you if you get it wrong.