Concept
A colon after a name declares what type it holds. Annotate function parameters, exported values and empty collections: the places where TypeScript cannot see the intent from a value.
The tutor works through these with you, in conversation and code. A session ends when you have shown them, not when a video does.
A few lines that show Type annotations doing its job.
function total(prices: number[], taxRate: number): number {
return prices.reduce((sum, p) => sum + p, 0) * (1 + taxRate);
}
const seen: Set<string> = new Set();
const byId: Record<string, { name: string }> = {};
let pending: string[] = []; // without this, [] infers as never[]Leaving an empty array or object unannotated. let items = [] is inferred as never[] in strict mode, so the first push is an error and the type never settles on what you meant.
Your roadmap puts these before Type annotations, unless you already know them.
Once a session shows you understand Type annotations, it comes back for review. Each review takes a minute and tells the memory model how well you still know it.
Topics that build on Type annotations.