Loading
Loading articles
By Kent C. Dodds
AI summary
This article explores the challenges of handling caught errors in TypeScript due to the language defaulting catch clause variables to 'unknown'. It demonstrates how to safely narrow these errors using type guards and utility functions to ensure robust error logging regardless of what is actually thrown.
Key points