TypeScript 1.1

效能改進

1.1 版本編譯器通常比之前任何版本快 4 倍左右。請參閱這篇部落格文章,瞭解一些令人印象深刻的圖表。

更好的模組可見性規則

現在,TypeScript 僅在提供 declaration 標誌時,才會嚴格執行模組中型別的可見性。例如,這對於 Angular 場景非常有用。

ts
module MyControllers {
interface ZooScope extends ng.IScope {
animals: Animal[];
}
export class ZooController {
// Used to be an error (cannot expose ZooScope), but now is only
// an error when trying to generate .d.ts files
constructor(public $scope: ZooScope) {}
/* more code */
}
}

TypeScript 文件是一個開源專案。歡迎透過提交 Pull Request 來幫助我們改進這些頁面 ❤

此頁面的貢獻者
MHMohamed Hegazy (52)
OTOrta Therox (15)
MHKMohammad Humayun Khan (1)
JBJack Bates (1)
2+

最後更新:2026 年 3 月 27 日