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 帮助我们改进这些页面 ❤

Last updated: Oct 23, 2026

 

本站中文内容由 tslang 项目翻译,部分译文来自 zhongsp/TypeScript;原文版权归 Microsoft 所有,遵循 CC BY 4.0 许可。