error TS2391: Function implementation is missing or not immediately following the declaration.
Bad Code ❌
Fixed Code ✔️
An abstract class is different from an interface. You have to use the
abstract modifier if you want to define a contract in an abstract class. If there is no
abstract modifier you will have to provide a implementation.
To solve the problem, we can mark
makeNoise with the
abstract keyword. That will enforce derived classes to implement this method on their own:
Another solution is to provide a base implementation for