首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

TypeScript 1.1

性能改进

1.1编译器的速度通常比任何以前的版本快4倍。

更好的模块可视性规则

如果--declaration提供标志,TypeScript 现在只严格执行模块中类型的可见性。这对于 Angular 场景非常有用,例如:

代码语言:javascript
复制
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 */
  }
}

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com