Solución
solution.tsTypeScript
class AppConfig {
readonly id: number;
readonly name: string;
constructor(id:number, name:string){
this.id = id;
this.name = name;
}
describe(): string { return `${this.id}: ${this.name}`}
}
export function getConfig(id: number, name: string): string {
// Crea una instancia de AppConfig con propiedades readonly y retorna describe()
const appConfig = new AppConfig(id, name);
return appConfig.describe();
}0respuestas