Skip to content

Commit 6c1af25

Browse files
committed
Various minor edits
1 parent fdb7bc5 commit 6c1af25

File tree

5 files changed

+58
-4
lines changed

5 files changed

+58
-4
lines changed

Chapter 2/code.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
var __extends = this.__extends || function (d, b) {
2+
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
3+
function __() { this.constructor = d; }
4+
__.prototype = b.prototype;
5+
d.prototype = new __();
6+
};
7+
var Westeros;
8+
(function (Westeros) {
9+
(function (Structures) {
10+
var BaseStructure = (function () {
11+
function BaseStructure() {
12+
}
13+
return BaseStructure;
14+
})();
15+
Structures.BaseStructure = BaseStructure;
16+
var Castle = (function (_super) {
17+
__extends(Castle, _super);
18+
function Castle(name) {
19+
this.name = name;
20+
_super.call(this);
21+
}
22+
Castle.prototype.Build = function () {
23+
console.log("Castle built: " + this.name);
24+
};
25+
return Castle;
26+
})(BaseStructure);
27+
Structures.Castle = Castle;
28+
})(Westeros.Structures || (Westeros.Structures = {}));
29+
var Structures = Westeros.Structures;
30+
})(Westeros || (Westeros = {}));
31+
32+
var cc = new Westeros.Structures.Castle("Winterfell");
33+
cc.Build();
34+
cc.name = "ss";

Chapter 2/simplePrototype.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Chapter 2/testModule.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
var b = 6;
2+
c = 7;

Chapter 8/jquery.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,22 @@
1111
$(item).val($(item).val().toUpperCase());
1212
});
1313
};
14+
15+
(function($){
16+
$.fn.yeller2 = function(){
17+
this.each(function(_, item){
18+
$(item).val($(item).val().toUpperCase());
19+
});
20+
};
21+
})(jQuery);
22+
23+
(function($){
24+
$.fn.yeller2 = function(){
25+
this.each(function(_, item){
26+
$(item).val($(item).val().toUpperCase());
27+
});
28+
};
29+
})(jQuery);
30+
1431
</script>
1532
</html>

Chapter 9/MessageUpgrader.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
module Login{
22
export class CreateUserv1Message implements IMessage{
3-
constructor(public UserName: string, public FirstName: string, public LastName: string, public EMail: string){
4-
this.__messageName = "CreateUserv1Message";
5-
}
63
__messageName: string
4+
UserName: string;
5+
FirstName: string;
6+
LastName: string;
7+
EMail: string;
78
}
89

910
export class CreateUserv2Message implements IMessage{

0 commit comments

Comments
 (0)