Why when declare method in a class the compiler beeps, stating that the use of the word function
is wrong.
In previous lessons from my learning to create a function, I first signed it as function
.
abstract class Empregado {
abstract getFuncao():string;
}
class Professor extends Empregado {
getFuncao():string {
return "Professor";
}
}
class Diretor extends Empregado {
getFuncao():string {
return "Diretor";
}
}