9. TypeScript
• TypeScript is a language for
application-scale JavaScript
development.
• TypeScript is a typed superset of
JavaScript that compiles to plain
JavaScript.
• Any browser. Any host. Any OS. Open
Source.
from “www.typescriptlang.org”
36. 静的型付けの例
var name: string;
var age : number;
function sqrt(num: number): number {
return num * num;
}
name = "kiyokura";
age = 20;
// 以下はエラー
name = 20;
age = "hatachi";
var x = sqrt("hoge"); // 引数が文字列型
46. 予定されているフィーチャー
• 0.9.0
– Generics
– Overload on constants
– Improve compiler performance
– Improvements to type system to help model a larger variety of
JS libraries
• 0.9.1
– Align with ECMAScript 6 modules
– Project integration support in VS plugin
• 1.x
– A handful of language features are scheduled for exploration
after the 1.0 release, including:
• Async/Await
• Mixins
• Protected access
– ES6-compatible codegen
51. 曰く
• JavaScript is Assembly Language for
the Web
• JavaScriptはWebのアセンブリ言語であ
る
Scott Hanselman
http://www.hanselman.com/blog/JavaScriptIsAssemblyLanguageForTheWebS
ematicMarkupIsDeadCleanVsMachinecodedHTML.aspx