An any on a payload parameter, added in a hurry, propagating through nine functions before anything checked a property.
// the entry point
function handle(payload: any) { /* ... */ }
// nine calls later
function applyDiscount(order) {
return order.total.amount * (1 - order.discount.rate)
}
// order.discount is optional. this had thrown in production
// twice, and the type system had nothing to say about it.
any does not stay where it is put — it flows, and everything downstream loses checking without any indication. Typing the entry point produced 22 errors, of which two were real bugs and the rest were tightening. The rule that came out of it is that any at a boundary is the one place it is never acceptable, and unknown with a parse is the cost of doing it properly.