From TypeScript@2.5, you can omit catch error block.
Before:
try { throw new Error(‘whatever‘); } catch(err) { console.log(err) }
Now:
try { throw new Error(‘whatever‘); } catch { console.log("error happened") }
It is just a syntax sugar, if you are not trying to do error handling
[TypeScript@2.5] Omit catch error block if not needed
原文:http://www.cnblogs.com/Answer1215/p/7487385.html