[TypeScript@2.5] Omit catch error block if not needed
2024-08-24 11:13:48
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
最新文章
- 前端学HTTP之字符集
- 转载:《TypeScript 中文入门教程》 8、函数
- gulp入门演练
- PostgreSQL9.2安装和配置指南
- 统计 F-test 和 T-test
- 学习了一下javascript的模块化编程
- NV OIT algorithm : Depth peeling is a fragment-level depth sorting technique
- ANR
- nginx二级域名配置
- 十条常用nmap命令行格式
- jQuery get/post区别及contentType取值
- python常见的特异点
- Python 的经典入门书籍有哪些?
- Kafka学习笔记-如何保证高可用
- 根据excel表格字段生成sql语句
- request.getRealPath的替代方法
- 用virtualenv建立独立虚拟环境 批量导入模块信息
- 基于Socket的低层次Java网络编程
- MySQL到底能支持多大的数据量?
- long的变量后面没有L加会有什么后果
热门文章
- visual studio 添加库文件
- Vijos——T1053 Easy sssp
- 洛谷 P1581 A+B Problem(升级版)
- [React] Validate Custom React Component Props with PropTypes
- 华为OJ平台试题 ——数组:整形数组合并
- 菜鸟nginx源代码剖析数据结构篇(七) 哈希表 ngx_hash_t(下)
- SQL查询表中的用那些索引
- 韦东山ARM裸机笔记(1)
- POJ——T 2891 Strange Way to Express Integers
- Nio学习3——基础模型:多路复用模型