// class 별로 조금씩 다를 수 있다.
// property 이름이 동적이라면?
// index signature 는 초기값이 없다.
class Students {
[index: string]: 'male' | 'female'; // 반드시 male 또는 female 이어야 한다.
//mark = 'hello'; // 따라서 error!
mark: 'male' = 'male';
}
const a = new Students();
a.mark = 'male';
a.anna = 'female';
console.log(a);
const b = new Students();
b.joy = 'female';
b.malza = 'male';
console.log(b);