TypeScript Threw Away My Error Types — Here's What I Use Instead

typescript dev.to

My project: Hermes IDE | GitHub Me: gabrielanhaia Java has checked exceptions. PHP has try/catch with a hierarchy of Throwable, Exception, and Error. C# has System.Exception with inner exceptions. TypeScript has... nothing. No throws clause. No exception hierarchy. The catch block gives you unknown and wishes you luck. This was the hardest adjustment for me. I came from languages where error handling had structure. TypeScript just lets errors fly and trusts you to figure it out. Afte

Read Full Tutorial open_in_new
arrow_back Back to Tutorials