ts
class Greeter {
greeting: string;
constructor (message: string) {
this.greeting = message;
}
greet() {
return "Hello, " + this.greeting;
}
}
js
var Greeter = (function () {
function Greeter(message) {
this.greeting = message;
}
Greeter.prototype.greet = function () {
return "Hello, " + this.greeting();
};
return Greeter;
})();
'Web > Typescript' 카테고리의 다른 글
조건문 (conditions) (0) | 2017.03.21 |
---|---|
function concept (0) | 2017.03.21 |
Variables concept (0) | 2017.03.20 |
Intro to Typescript (0) | 2017.03.20 |
타입스크립트 소개 (0) | 2017.03.10 |