TypeScript(5)
Types that catch real mistakes: strict mode, generics, narrowing, and typing the edges where outside data enters an app.
- One @ts-expect-error, Zero @ts-ignore: What Five Codebases Actually SuppressWe counted every @ts-ignore, @ts-expect-error and @ts-nocheck in five production codebases. The total was one. The same 31,128 lines hold 304 type assertions, and only one of those two kinds of opt-out tells you when it has gone stale.13 min read
- TypeScript Secure Coding, Measured: 371 Escape Hatches Across 35,383 LinesWe used the TypeScript compiler API to count every place five production codebases tell the type system to stop checking, then read every one that sits on untrusted input. The count turned out to be the wrong thing to worry about.18 min read
- What TypeScript's Two Strictest Flags Actually Cost: 129 Errors Across 39,824 LinesWe turned on noUncheckedIndexedAccess and exactOptionalPropertyTypes across five production codebases and counted every error. The cost per thousand lines varied by 24x, and half the work was not where you index.12 min read
- Next.js API Routes: Route Handlers, Caching, and the Server Actions DecisionHow route handlers actually behave in Next.js 16: GET is no longer cached by default, params are async, and most of what you need is a server action instead. With a real deployment that is not on Vercel.17 min read
- TypeScript Best Practices: The tsconfig Flags and Patterns That Catch Real BugsWhich strict flags earn their keep and what each one costs, when to reach for @ts-expect-error over @ts-ignore, why catch variables are unknown, and how to type the edges where outside data enters.14 min read