Literal types restrict values to specific strings or numbers:
type Direction = "north" | "south" | "east" | "west";
type DiceRoll = 1 | 2 | 3 | 4 | 5 | 6;
let dir: Direction = "north"; // OK
dir = "up"; // Error: not one of the allowed values
This catches typos and invalid values at compile time.