TypeScript 2.0 最终版,微软脚本编程语言
欢迎加入运维网交流群:263444886 http://onexin.iyunv.com/source/plugin/onexin_bigdata/https://my.oschina.net/img/hot3.pngTypeScript 2.0 最终版发布了。它带来了一些新的功能,提高了开发人员的生产力,先进的TypeScript 校准和ECMAScrip的发展,为JavaScript库和工具提供了广泛的支持,并增强了语言服务,提供了跨工具的一流编辑体验。
值得关注的更新内容:
控制流分析类型
function f(condition: boolean) {
let result: number;
if (condition) {
result = computeImportantStuff();
}
// Whoops! 'result' might never have been initialized!
return result;
}
readonly 修饰符
class Person {
readonly name: string;
constructor(name: string) {
if (name.length
页:
[1]