TypeScript checks relationships before the program runs. An annotation states a contract, while inference derives one from an expression or default value. You can often keep the local code short without weakening its public function signature. Literal unions describe a closed set of states, and readonly inputs tell a helper to preserve the caller's collection. Runtime examples still matter: a function can have the right types and return the wrong number. These exercises check both layers. The compiler also checks calls that should be rejected, so replacing a precise parameter with any won't satisfy the contract. Use the error message to find the broken relationship before changing the runtime logic.