性能改进
¥Performance Improvements
1.1 编译器的速度通常比任何以前的版本快 4 倍左右。参见 这篇博文包含一些令人印象深刻的图表。
¥The 1.1 compiler is typically around 4x faster than any previous release. See this blog post for some impressive charts.
更好的模块可见性规则
¥Better Module Visibility Rules
TypeScript 现在仅当提供了 declaration
标志时,才会严格执行模块中类型的可见性。这对于 Angular 场景非常有用,例如:
¥TypeScript now only strictly enforces the visibility of types in modules if the declaration
flag is provided. This is very useful for Angular scenarios, for example:
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 filesconstructor(public $scope: ZooScope) {}/* more code */}}