-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy path026_namespaces.js
47 lines (47 loc) · 1.24 KB
/
026_namespaces.js
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
35
36
37
38
39
40
41
42
43
44
45
46
47
var Blog;
(function (Blog) {
var Post = (function () {
function Post(post) {
this.title = post.title;
this.body = post.body;
}
Post.prototype.printPost = function () {
console.log(this.title);
console.log(this.body);
};
return Post;
}());
Blog.Post = Post;
})(Blog || (Blog = {}));
var Content;
(function (Content) {
var Post = (function () {
function Post(post) {
this.title = post.title;
this.body = post.body;
this.slug = post.slug;
this.seoKeywords = post.seoKeywords;
}
Post.prototype.printPost = function () {
console.log(this.title);
console.log(this.body);
console.log(this.slug);
console.log(this.seoKeywords);
};
return Post;
}());
Content.Post = Post;
})(Content || (Content = {}));
var blogPost = new Blog.Post({
title: "My Great Post",
body: "Some content"
});
blogPost.printPost();
var contentPost = new Content.Post({
title: "My Great Post",
body: "Some content",
slug: 'my-great-post',
seoKeywords: 'any, words'
});
contentPost.printPost();
//# sourceMappingURL=026_namespaces.js.map