TypeScript/tests/baselines/reference/extendBaseClassBeforeItsDeclared.js
2014-07-12 17:30:19 -07:00

26 lines
676 B
JavaScript

//// [extendBaseClassBeforeItsDeclared.ts]
class derived extends base { }
class base { constructor (public n: number) { } }
//// [extendBaseClassBeforeItsDeclared.js]
var __extends = this.__extends || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
};
var derived = (function (_super) {
__extends(derived, _super);
function derived() {
_super.apply(this, arguments);
}
return derived;
})(base);
var base = (function () {
function base(n) {
this.n = n;
}
return base;
})();