Why TypeScript?
The bug JavaScript never sees, TypeScript underlines in red before anything runs. The compiler becomes your reviewer — and the AI's.
Types and inference
string, number, boolean… and inference: TypeScript guesses most types by itself. Annotate little, but well.
Interfaces and type aliases
Describe the shape of your objects: interface or type, optional properties, readonly — and typos caught dead.
Unions and narrowing
A value that can be two things: string | number. Narrowing shrinks the uncertainty down to a safe type.
Well-typed functions
Parameters, returns, optionals, callbacks: a function's full contract — no more calls with a missing argument.
Generics
The cake mold: reusable code that keeps the type contract. The course's pivot lesson, taken gently.
Utility types
Partial, Pick, Omit, Record: transform existing types instead of rewriting them.
Compile time vs runtime
Types are erased at runtime: what tsconfig compiles, what "as" promises, and why an API can still lie to you.
Installing TypeScript
npm install, tsconfig (strict by default), and the pro workflow: who runs your code, who checks your types. From zero to a fully tooled project.
TS in the real world
any piercing the net vs unknown forcing checks, the DOM, API responses — and the TS + AI workflow.
What you will learn
Read and write types: inference, interfaces, unions, narrowing — annotate little, but well
Tame generics (the cake mold) and utility types (Partial, Pick, Omit…)
Understand what TypeScript guarantees (compile time) and what it does NOT (runtime, any, lying casts)
Use types as a contract to frame AI-generated code — and spot its fake fixes (as any)
Prerequisites: being comfortable in JavaScript (the JavaScript course, ideally Advanced JavaScript). Every lesson embeds a real TypeScript compiler in the browser: you see type errors live, with nothing to install.