Demo University

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.