[TS] 접근 제어자
TIL
접근 제어자접근 제어자는 타입스크립트에서만 제공되는 기능으로, 클래스의 특정 필드나 메서드를 접근할 수 있는 범위를 설정하는 기능이다.publicpublic으로 설정된 필드는 클래스 외부에서 자유롭게 접근하고 수정할 수 있다.class Employee { name: string; hp: number; position: string; constructor(name: string, hp: number, position: string) { this.name = name; this.hp = hp; this.position = position; } work() { console.log("일함"); }}const employee = new Employee("고견", 90, "dev..