Chapter 9: Backpressure

Type checker

A program that reads your code without running it and checks that each value is used as the kind of thing it is: no adding text to a number, no asking for a field that isn't there. For TypeScript that program is tsc, and tsc --noEmit only checks.

Nobody has to write a rule or a test first, so it covers code the agent wrote a second ago. Its errors come with a file, a line and a reason, which is close to a ready-made prompt. And it has no idea what you meant: a program can be perfectly typed and wrong.

Say it to your agent

“Run bunx tsc --noEmit and fix every error at its cause. Don't add any, as, ! or @ts-ignore to make one go away. If you think the type itself is wrong, stop and show me why.”

The workshop

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