forked from stimms/JavaScriptPatterns
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcode.js
More file actions
34 lines (33 loc) · 1.12 KB
/
code.js
File metadata and controls
34 lines (33 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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 Westeros;
(function (Westeros) {
(function (Structures) {
var BaseStructure = (function () {
function BaseStructure() {
}
return BaseStructure;
})();
Structures.BaseStructure = BaseStructure;
var Castle = (function (_super) {
__extends(Castle, _super);
function Castle(name) {
this.name = name;
_super.call(this);
}
Castle.prototype.Build = function () {
console.log("Castle built: " + this.name);
};
return Castle;
})(BaseStructure);
Structures.Castle = Castle;
})(Westeros.Structures || (Westeros.Structures = {}));
var Structures = Westeros.Structures;
})(Westeros || (Westeros = {}));
var cc = new Westeros.Structures.Castle("Winterfell");
cc.Build();
cc.name = "ss";