Created
June 14, 2013 06:17
-
-
Save harold/5779832 to your computer and use it in GitHub Desktop.
l33t TypeScript JS inheritance scheme.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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