Skip to content

Commit fe1c1d4

Browse files
zongzi531zhongsp
authored andcommitted
Update Breaking changes in TypeScript 2.8 (zhongsp#234)
1 parent bb896ac commit fe1c1d4

3 files changed

Lines changed: 39 additions & 0 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@
9696
* [TypeScript 1.3](./doc/release-notes/TypeScript%201.3.md)
9797
* [TypeScript 1.1](./doc/release-notes/TypeScript%201.1.md)
9898
* [Breaking Changes](./doc/breaking-changes/breaking-changes.md)
99+
* [TypeScript 2.8](./doc/breaking-changes/TypeScript%202.8.md)
99100
* [TypeScript 2.7](./doc/breaking-changes/TypeScript%202.7.md)
100101
* [TypeScript 2.6](./doc/breaking-changes/TypeScript%202.6.md)
101102
* [TypeScript 2.4](./doc/breaking-changes/TypeScript%202.4.md)
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# TypeScript 2.8
2+
3+
## `--noUnusedParameters`下检查未使用的类型参数
4+
5+
根据 [#20568](https://github.com/Microsoft/TypeScript/issues/20568),未使用的类型参数之前在`--noUnusedLocals`下报告,但现在报告在`--noUnusedParameters`下。
6+
7+
## `lib.d.ts`中删除了一些Microsoft 专用的类型
8+
9+
从DOM定义中删除一些Microsoft 专用的类型以更好地与标准对齐。 删除的类型包括:
10+
11+
* `MSApp`
12+
* `MSAppAsyncOperation`
13+
* `MSAppAsyncOperationEventMap`
14+
* `MSBaseReader`
15+
* `MSBaseReaderEventMap`
16+
* `MSExecAtPriorityFunctionCallback`
17+
* `MSHTMLWebViewElement`
18+
* `MSManipulationEvent`
19+
* `MSRangeCollection`
20+
* `MSSiteModeEvent`
21+
* `MSUnsafeFunctionCallback`
22+
* `MSWebViewAsyncOperation`
23+
* `MSWebViewAsyncOperationEventMap`
24+
* `MSWebViewSettings`
25+
26+
## `HTMLObjectElement`不再具有`alt`属性
27+
28+
根据 [#21386](https://github.com/Microsoft/TypeScript/issues/21386),DOM库已更新以反映WHATWG标准。
29+
30+
如果需要继续使用`alt`属性,请考虑通过全局范围中的接口合并重新打开`HTMLObjectElement`
31+
32+
```ts
33+
// Must be in a global .ts file or a 'declare global' block.
34+
interface HTMLObjectElement {
35+
alt: string;
36+
}
37+
```

doc/breaking-changes/breaking-changes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Breaking Changes
22

3+
* [TypeScript 2.8](./TypeScript 2.8.md)
34
* [TypeScript 2.7](./TypeScript 2.7.md)
45
* [TypeScript 2.6](./TypeScript 2.6.md)
56
* [TypeScript 2.4](./TypeScript 2.4.md)

0 commit comments

Comments
 (0)