Development/Typescript
[Typescript] playground
레오나르도 다빈츠
2022. 6. 6. 13:03
◽ 테스트 사이트
TS Playground - An online editor for exploring TypeScript and JavaScript
The Playground lets you write TypeScript or JavaScript online in a safe and sharable way.
www.typescriptlang.org
◽ 코드 변환해보기
class Student {
name: string;
constructor(name: string) {
this.name = name;
}
}
📄 ES5로 변환
"use strict";
var Student = /** @class */ (function () {
function Student(name) {
this.name = name;
}
return Student;
}());
📄 ES6+로 변환
"use strict";
class Student {
constructor(name) {
this.name = name;
}
}