class Phone {
model: string
constructor(model: string) {
this.model = model
}
}
class Employee {
constructor(
public firstName: string,
public lastName: string,
public phone: Phone) {}
}
let nokiaPhone = new Phone("Nokia 6610");
let kim = new Employee("Victorya", "Kim",
new Phone("iPhone 11 Pro"))
console.log(nokiaPhone.model)
console.log(kim.phone.model)