~ It’s a superset of JavaScript. ~ Adds static typing (type checking before running). ~ Compiles to JavaScript (browser/Node can run it).
~ (Many common JS bugs are avoided before deployment.) ~ Finds bugs early ~ Makes code predictable ~ Better autocomplete & docs ~ Easier teamwork ~ Prevents runtime crashes
npx tsc --init npm install ts-node
npx ts-node
tsc # compile to test.js node # run JS