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

最新文章

  1. 前端学HTTP之字符集
  2. 转载:《TypeScript 中文入门教程》 8、函数
  3. gulp入门演练
  4. PostgreSQL9.2安装和配置指南
  5. 统计 F-test 和 T-test
  6. 学习了一下javascript的模块化编程
  7. NV OIT algorithm : Depth peeling is a fragment-level depth sorting technique
  8. ANR
  9. nginx二级域名配置
  10. 十条常用nmap命令行格式
  11. jQuery get/post区别及contentType取值
  12. python常见的特异点
  13. Python 的经典入门书籍有哪些?
  14. Kafka学习笔记-如何保证高可用
  15. 根据excel表格字段生成sql语句
  16. request.getRealPath的替代方法
  17. 用virtualenv建立独立虚拟环境 批量导入模块信息
  18. 基于Socket的低层次Java网络编程
  19. MySQL到底能支持多大的数据量?
  20. long的变量后面没有L加会有什么后果

热门文章

  1. visual studio 添加库文件
  2. Vijos——T1053 Easy sssp
  3. 洛谷 P1581 A+B Problem(升级版)
  4. [React] Validate Custom React Component Props with PropTypes
  5. 华为OJ平台试题 ——数组:整形数组合并
  6. 菜鸟nginx源代码剖析数据结构篇(七) 哈希表 ngx_hash_t(下)
  7. SQL查询表中的用那些索引
  8. 韦东山ARM裸机笔记(1)
  9. POJ——T 2891 Strange Way to Express Integers
  10. Nio学习3——基础模型:多路复用模型