Solución
solution.tsTypeScript
class Person {
constructor(public firstName:string, public lastName: string){}
get fullName(){
return `${this.firstName} ${this.lastName}`
}
}
export function getFullName(firstName: string, lastName: string): string {
// Crea una instancia de Person y retorna el getter fullName
const person = new Person(firstName, lastName)
return person.fullName;
}0respuestas