type Dev = { name: string; role: string };
class DeveloperProfile {
constructor(private readonly developer: Dev) {}
getDeveloperInfo() {
console.log(`
Name: ${this.developer.name}
Role: ${this.developer.role}
`);
}
}
const devProfile = new DeveloperProfile({
name: "Diana Martine",
role: "Software Engineering Analyst",
});
devProfile.getDeveloperInfo();- Email:
martinecoding@gmail.com