性能改进
1.1 版本编译器通常比之前任何版本快 4 倍左右。请参阅这篇博客文章,了解一些令人印象深刻的图表。
更好的模块可见性规则
现在,TypeScript 仅在提供 declaration 标志时,才会严格执行模块中类型的可见性。例如,这对于 Angular 场景非常有用。
tsmodule 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 filesconstructor(public $scope: ZooScope) {}/* more code */}}