※ 클래스 class Car{ color : string; //미리 선언해줘야 생성자에서 사용가능 constructor(color : string){ this.color = color; } start(){ console.log("start"); } } const bmw = new Car("red"); 미리 선언 하는 대신 readonly 를 이용하는 방법 class Car{ constructor(readonly color : string){ this.color = color; } start(){ console.log("start"); } } const bmw = new Car("red"); ES6 에서 클래스는 다른 객체 지향 언어들처럼 접근제한자를 지원하지 않는다. But 타입스크립트에서는 지원한다. ..