TypeScript for Beginners
A friendly first course in TypeScript for people who know a little JavaScript. Learn types, interfaces, unions, and generics, and see how TypeScript helps you catch mistakes before your website ever loads.
TypeScript is JavaScript with a type system on top. In this course you will learn what types are, why they matter as websites grow, and how to describe your data with interfaces, unions, and generics. You will also see how TypeScript compiles down to plain JavaScript and where it fits in a real web project. Every idea is explained with short, readable examples that build on the JavaScript you already know.
Why TypeScript?
Find out what TypeScript is, why types make bigger projects easier, and how to give your first variables and functions their own types.
Shaping Your Data
Give types to the arrays and objects that hold your real data, describe object shapes with interfaces, and handle values that might be missing.
Flexible Types
Learn union and literal types for values with a few allowed options, let type inference do the boring work, and compare enums with unions.
TypeScript in the Real World
Take a gentle first look at generics, see exactly how TypeScript turns into JavaScript, and learn where it fits when building a real website.