Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

199
Visualizações
Why I don't get compile time error when I am not implementing some method from my interface which is implemented in base class?

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 ?

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda