xxxxxxxxxx
abstract class Animal {
abstract makeSound(): void;
move(): void {
console.log("roaming the earth...");
}
}Try
xxxxxxxxxx
abstract class APerson {
abstract getName(): string
}
class Person extends APerson {
getName(): string {
return "john doe"
}
}
const res = new Person()
console.log(res.getName())