10. クラスについて • TypeScriptはクラスベースなOOP! class Test { str:string; constructor() { this.str = "new"; } showMessage():void { alert(this.str); } } new Test().showMessage(); var Test = (function () { function Test() { this.str = "new"; } Test.prototype.showMessage = function () { alert(this.str); }; return Test; })(); new Test().showMessage(); TS http://goo.gl/G7t0U JS Wednesday, July 3, 13 11. module Sam