TypeScript:微軟的JavaScript替代

jopen 13年前發布 | 18K 次閱讀 JavaScript

        英文原文:TypeScript - Microsoft's Replacement For JavaScript

        每個人心目中似乎都有一個 JavaScript 替代,Google 甚至有兩個。現在,微軟也透露了它的 JavaScript 替代。

        C# 之父 Anders Hejlsberg 等人正在創造新語言 TypeScript,微軟已經在 Apache 2.0 許可證下在自家的開源托管網站上發布了一個預覽版本,公布了語言規格。TypeScript 兼容 JavaScript,可以載入 JavaScript 代碼然后運行。TypeScript 與 JavaScript 相比進步的地方包括:加入注釋,讓編譯器理解所支持的對象和函數,編譯器會移除注釋,不會增加開銷;增加一個完整的類結構,使之更新是傳統的面向對象語 言。

TypeScript:微軟的JavaScript替代

        A class in TypeScript (above)- and what it compiles to (below)

TypeScript:微軟的JavaScript替代

        觀看視頻:http://channel9.msdn.com/posts/Anders-Hejlsberg-Introducing-TypeScript/player?w=400&h=288

        附加資源:

        Welcome to TypeScript - The TypeScript Language has an offical site, and this is it. This site does a nice job of giving the key information about the language and its uses, as well as highlighting that it is an open source project, which is cross platform. TypeScript is still causing quite a buzz in the community, here are some more of peoples initial impressions: