-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclassModifier.js
More file actions
41 lines (41 loc) · 1.17 KB
/
Copy pathclassModifier.js
File metadata and controls
41 lines (41 loc) · 1.17 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
35
36
37
38
39
40
41
//Class Modifiers
var ClassWithPublicProperty = /** @class */ (function () {
function ClassWithPublicProperty() {
}
ClassWithPublicProperty.printData = function () {
console.log(this._hobby);
};
Object.defineProperty(ClassWithPublicProperty.prototype, "id", {
get: function () {
return this._id;
},
set: function (value) {
this._id = value;
},
enumerable: true,
configurable: true
});
Object.defineProperty(ClassWithPublicProperty.prototype, "name", {
get: function () {
return this._name;
},
set: function (value) {
this._name = value;
},
enumerable: true,
configurable: true
});
Object.defineProperty(ClassWithPublicProperty.prototype, "hobby", {
get: function () {
return this._hobby;
},
set: function (value) {
this._hobby = value;
},
enumerable: true,
configurable: true
});
ClassWithPublicProperty._hobby = "Playing Video Games Like PS4 Console...";
return ClassWithPublicProperty;
}());
ClassWithPublicProperty.printData();