Typescript 3.8 新特性
1. #private
Typescript 3.8 引入了 #private
修饰符,可以在类中声明私有属性。
1 | class Foo { |
2. top level await
Typescript 3.8 引入了 top level await,可以在模块的顶层使用 await
。
1 | // index.ts |
3. type-only import
Typescript 3.8 引入了 type-only import,可以在导入时只导入类型,不导入值。
1 | import type { Foo } from "./foo"; |
评论
评论插件加载失败
正在加载评论插件