仕様には、次の関数が拡張に使用されることが記載されています。
var __extends = this.__extends || function(d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function f() { this.constructor = d; }
f.prototype = b.prototype;
d.prototype = new f();
}
ただし、現在生成されている関数は次のとおりです。
var __extends = this.__extends || function (d, b) {
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
};
これは静的継承を壊します:
class A{
fooMem=10;
static fooStat=10;
}
class B extends A{};
var b = new B();
alert(b.fooMem.toString());
alert(B.fooStat.toString());
言及されているドキュメント extends 関数が使用されている場合、どちらが機能しますか:テスト
ドキュメントに記載されている関数が使用されなかった理由を知っている人はいますか?