TypeScript 2.5, the upcoming upgrade to Microsoft’s popular typed superset of JavaScript, is now available as a release candidate. It includes an enhancement for try/catch statements for errors as well as compiler improvements.

The catch binding parameters capability in TypeScript 2.5 uses a late-stage ECMAScript feature to make catch binding optional in try/catch statements. Making catch binding optional “means we can just omit unusedError altogether,” said Daniel Rosenwasser, Microsoft’s program manager for TypeScript. The reason for that is there are times when developers expect something might fail by throwing an error, but the developer does not care what the error is.

To read this article in full or to leave a comment, please click here