← TypeScript learning path
TypeScript · Module 1 of 10

Why TypeScript?

TypeScript adds types to JavaScript so many bugs are caught before running.

📖 Key ideas

  1. TypeScript is JavaScript plus static types, made by Microsoft.
  2. Code compiles (transpiles) to plain JavaScript.
  3. Editors give autocomplete and catch errors as you type.
  4. Install: npm install -D typescript; compile with npx tsc.
  5. Every valid JavaScript file is almost valid TypeScript.
💡 Real-life example: TypeScript is a spell-checker for code: it underlines mistakes before you send the letter.
TypeScriptJavaScript with static types
tscTypeScript compiler
Static typingTypes checked before running
.tsTypeScript file extension