I have the following code
interface IDownload {
downloadFile(): void;
}
class BaseClass implements IDownload {
downloadFile(): void {
console.log('some logic here');
}
}
class Sub extends BaseClass {
}
so my sub class has access to the methods from BaseClass because we are extending from that class.
My base class implement some method from interface.
When i try to extend the class and implement again the same interface
class Sub extends BaseClass implements IDownload {
}
I don't get compile time error that i need to implement the method from IDownload. I guees it is like that because it sees that the base class already implements it.
But i want to have that check also here in my sub class because i want to have the interface contract in the base class where all the methhods will exist on the sub class.
How can i do this ?