Guided Notes

Introduction to TypeScript

What TypeScript is, why teams adopt it, how compilation works, installing tsc, and your first typed program.

What TypeScript is

Slide 1 / 4

TypeScript is JavaScript with a static type system, created by Microsoft and now used by most large JavaScript projects (VS Code, Angular, many React and Node codebases).

β€’ You add type annotations: let total: number = 0; β€’ The TypeScript compiler (tsc) checks the types and reports mistakes before the code runs. β€’ It then outputs plain JavaScript that runs anywhere JavaScript runs.

Types exist only at compile time β€” they are erased from the output.