Skip to content

Instantly share code, notes, and snippets.

@drewhamlett
Created October 4, 2012 18:30
Show Gist options
  • Save drewhamlett/3835483 to your computer and use it in GitHub Desktop.
Save drewhamlett/3835483 to your computer and use it in GitHub Desktop.
Style
// -- 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