A declaration file describes code that exists elsewhere. It gives the compiler a contract, but it can't prove that a remote service follows that contract. Keep that distinction visible when you wrap older JavaScript modules or consume parsed JSON. The declaration should match what callers can rely on, and runtime validation belongs at the boundary where data arrives.
These exercises practice declarations through interfaces and typed wrappers, then revisit strict null checks, unknown errors, and exhaustive unions. An optional property requires a missing-value decision. A caught object is not automatically an Error. A discriminated union can make an omitted switch branch a compile-time failure. The compiler assertions deliberately attempt invalid calls, while runtime checks verify that valid edge values survive your implementation.