Chapter 1: The machine

Compiler

Also called Compile, tsc

A program that reads all your source code and translates it into a form a machine can run. If anything is broken, it refuses and produces nothing. Go, Rust and C are compiled. TypeScript's compiler, tsc, checks each value is the right kind and writes JavaScript.

A compiler is a free no. It arrives in seconds, before anything has run, in a form an agent can read and fix, so a compile step is one of the cheapest checks you can put in an agent's way.

Say it to your agent

“Run bun run typecheck. Fix every error by changing the code, not by adding any or @ts-ignore. Paste the last lines of output and the exit code.”

The workshop

Name a word, or describe what you mean in everyday language.