-
Notifications
You must be signed in to change notification settings - Fork 0
/
interface.js
41 lines (41 loc) · 1016 Bytes
/
interface.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
var Robot = /** @class */ (function () {
function Robot() {
this.speed = 30;
}
Robot.prototype.run = function () {
return "로봇이 ";
};
Robot.prototype.setSpeed = function (speed) {
this.speed = speed;
};
Robot.prototype.printAddress = function () {
return "서울 강서구 등촌1동";
};
return Robot;
}());
var Person = /** @class */ (function () {
function Person() {
this.speed = 30;
}
Person.prototype.run = function () {
return this.speed + "정도로 뜁니다.";
};
Person.prototype.setSpeed = function (speed) {
this.speed = speed;
};
Person.prototype.printAddress = function () {
return "서울 강남구 역삼1동";
};
return Person;
}());
function call(vari) {
console.log(vari.run());
console.log(vari.printAddress());
}
var p = new Person();
p.setSpeed(50);
call(p);
var r = new Robot();
r.setSpeed(1000);
call(r);
//# sourceMappingURL=interface.js.map