性能改进
🌐 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:
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 */}}