what is new in TypeScript 2.8

This commit is contained in:
zhongsp 2018-06-15 15:07:53 +08:00
parent 19a88f08c6
commit 68f3d39fea

View File

@ -195,7 +195,6 @@ type AnyFunction = (...args: any[]) => any;
type ReturnType<T extends AnyFunction> = T extends (...args: any[]) => infer R ? R : any;
```
### 预定义的有条件类型
TypeScript 2.8在`lib.d.ts`里增加了一些预定义的有条件类型: