Typescript: abstract classes
Example:
abstract class Animal {
abstract makeSound(): void;
move(): void {
console.log("Moving!");
}
}
Abstract classes provide a base for other classes but cannot be instantiated directly.
Solution:
// Use abstract classes as a blueprint for other classes. Implement all abstract methods in derived classes.