Quantcast
Channel: fettblog.eu | TypeScript, JavaScript, Jamstack
Viewing all articles
Browse latest Browse all 203

TypeScript: Narrow types in catch clauses

$
0
0

When you are coming from languages like Java, C++, or C#, you are used to doing your error handling by throwing exceptions. And subsequently, catching them in a cascade of catch clauses. There are arguably better ways to do error handling, but this one has been around for ages and given history and influences, has also found its way into JavaScript.


Viewing all articles
Browse latest Browse all 203

Trending Articles