Created
October 4, 2012 18:30
-
-
Save drewhamlett/3835483 to your computer and use it in GitHub Desktop.
Style
This file contains 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
// -- Module creation | |
var Main; | |
(function (Main) { | |
var Person = (function () { | |
function Person(name) { | |
this.name = name; | |
} | |
Person.prototype.sayHello = function () { | |
return "Hello, " + this.name; | |
}; | |
return Person; | |
})(); | |
Main.Person = Person; | |
})(Main || (Main = {})); | |
// -- Inheritance | |
var __extends = this.__extends || function (d, b) { | |
function __() { this.constructor = d; } | |
__.prototype = b.prototype; | |
d.prototype = new __(); | |
} | |
var Person = (function () { | |
function Person(name) { | |
this.name = name; | |
} | |
return Person; | |
})(); | |
var Drew = (function (_super) { | |
__extends(Drew, _super); | |
function Drew() { | |
_super.call(this, "Drew"); | |
} | |
return Drew; | |
})(Person); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment