Skip to content

Commit

Permalink
Update Breaking changes in TypeScript 2.8 (zhongsp#234)
Browse files Browse the repository at this point in the history
  • Loading branch information
zongzi531 authored and zhongsp committed Nov 15, 2018
1 parent bb896ac commit fe1c1d4
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
* [TypeScript 1.3](./doc/release-notes/TypeScript%201.3.md)
* [TypeScript 1.1](./doc/release-notes/TypeScript%201.1.md)
* [Breaking Changes](./doc/breaking-changes/breaking-changes.md)
* [TypeScript 2.8](./doc/breaking-changes/TypeScript%202.8.md)
* [TypeScript 2.7](./doc/breaking-changes/TypeScript%202.7.md)
* [TypeScript 2.6](./doc/breaking-changes/TypeScript%202.6.md)
* [TypeScript 2.4](./doc/breaking-changes/TypeScript%202.4.md)
Expand Down
37 changes: 37 additions & 0 deletions doc/breaking-changes/TypeScript 2.8.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# TypeScript 2.8

## `--noUnusedParameters`下检查未使用的类型参数

根据 [#20568](https://github.com/Microsoft/TypeScript/issues/20568),未使用的类型参数之前在`--noUnusedLocals`下报告,但现在报告在`--noUnusedParameters`下。

## `lib.d.ts`中删除了一些Microsoft 专用的类型

从DOM定义中删除一些Microsoft 专用的类型以更好地与标准对齐。 删除的类型包括:

* `MSApp`
* `MSAppAsyncOperation`
* `MSAppAsyncOperationEventMap`
* `MSBaseReader`
* `MSBaseReaderEventMap`
* `MSExecAtPriorityFunctionCallback`
* `MSHTMLWebViewElement`
* `MSManipulationEvent`
* `MSRangeCollection`
* `MSSiteModeEvent`
* `MSUnsafeFunctionCallback`
* `MSWebViewAsyncOperation`
* `MSWebViewAsyncOperationEventMap`
* `MSWebViewSettings`

## `HTMLObjectElement`不再具有`alt`属性

根据 [#21386](https://github.com/Microsoft/TypeScript/issues/21386),DOM库已更新以反映WHATWG标准。

如果需要继续使用`alt`属性,请考虑通过全局范围中的接口合并重新打开`HTMLObjectElement`

```ts
// Must be in a global .ts file or a 'declare global' block.
interface HTMLObjectElement {
alt: string;
}
```
1 change: 1 addition & 0 deletions doc/breaking-changes/breaking-changes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Breaking Changes

* [TypeScript 2.8](./TypeScript 2.8.md)
* [TypeScript 2.7](./TypeScript 2.7.md)
* [TypeScript 2.6](./TypeScript 2.6.md)
* [TypeScript 2.4](./TypeScript 2.4.md)
Expand Down

0 comments on commit fe1c1d4

Please sign in to comment.