Cancellation Patterns in TypeScript: Taming AbortController

Most async code in a typical TypeScript codebase has no concept of "stop." A user navigates away, a request times out, a parent operation fails — and the in-flight fetch, database query, or background task just keeps running, burning CPU and holding connections open for work nobody wants anymore. Cancellation isn't an edge case. It's a first-class part of async design that gets bolted on too late, if at all.

AbortController has been available in Node.js and browsers for years, but most teams use it as a one-off fetch timeout trick instead of a systemic cancellation strategy. That's a missed opportunity.