Skip to content

TypeScript `@throws` JSDoc and Error Typing in 2026: Why Exceptions Are Still Untyped and What to Do About It

7.8 relevance
Score Breakdown
technical depth
9
novelty
7
actionability
8
community
6
strategic
6
personal
9

Scored daily by a customisable AI persona to surface the most relevant engineering leadership news.

Deep dive into TypeScript's untyped exceptions with practical patterns for production — directly actionable for any TypeScript engineer.

Languages dev.to
TypeScript `@throws` JSDoc and Error Typing in 2026: Why Exceptions Are Still Untyped and What to Do About It
Summary

TypeScript in 2026 still lacks typed exceptions because it inherits JavaScript's unchecked exception model, leaving `@throws` JSDoc annotations with zero compiler enforcement. Three technical barriers prevent implementation: dynamic function references lose throw information through indirection, npm packages lack throw annotations, and JavaScript's `throw` accepts any type. Teams must adopt Result types (`Result<T, E>`) or discriminated unions with type guards to get compiler-verified error handling today.

Author

jsmanifest

More from jsmanifest →