Skip to content

Instantly share code, notes, and snippets.

@harold
Created June 14, 2013 06:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save harold/5779832 to your computer and use it in GitHub Desktop.
Save harold/5779832 to your computer and use it in GitHub Desktop.
l33t TypeScript JS inheritance scheme.
var __extends = this.__extends || function (d, b) {
function __() { this.constructor = d; }
__.prototype = b.prototype;
d.prototype = new __();
};
var A = (function () {
function A() { }
A.prototype.func = function () {
};
return A;
})();
;
var B = (function (_super) {
__extends(B, _super);
function B() {
_super.apply(this, arguments);
}
B.prototype.func = function () {
_super.prototype.func.call(this);
};
return B;
})(A);
;
//@ sourceMappingURL=app.js.map
class A {
func() { }
};
class B extends A {
func() {
super.func();
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment