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 日