Type annotations
TypeScript is JavaScript with types. You describe what kind of value a variable holds, and TypeScript checks your code before it runs, catching mistakes that would otherwise show up as bugs later.
let customer: string = "Rudo";
let items: number = 3;
let paid: boolean = false;
The part after the colon is a type annotation. The basic types are string, number and boolean.
If you assign the wrong kind of value, TypeScript reports an error:
items = "three";
// Type 'string' is not assignable to type 'number'.
Type inference
You often do not need to write the type: TypeScript works it out from the first value.
let city = "Harare"; // TypeScript knows city is a string
city = 42; // error: number is not assignable to string
Annotate when it adds clarity, or when there is no value yet (let total: number;).
How checking works here
Check my code runs the TypeScript compiler on your code. A types check passes only when there are no type errors. Your code still runs with Run ▶ even when it has type errors, just as JavaScript would, which is exactly how such bugs reach real users.
Your task
The starter has three type errors. Fix the values so each matches its variable's type: the customer's name is Rudo, they ordered 3 items, and they have paid (true). Then run it.