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

302
Visualizações
Visual studio code doesnt give out error after parents function didnt close corectly how to fix?

so here is the code first off is the construct function after that is the parents function

    public construct() //child
{
    super.construct;
    }
        protected construct() //parent
    {

    }

so the problem is that i DONT get an error even do i gotta need one this is because my class mate gets one and its anoying for him i use visual studio code with typescript ive tyed multiple extensions but nothing worked so far down bellow i added an pic of how it suposed to look like

error immage

if you know i will be happy to recieve ur help if u got the same lets share the pain :)

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

the struct when you want to extend a class should be like:

class Parent {
  constructor(){
    console.log('parent constructor')
  }
  test(){console.log(1)}
}
class Child  extends Parent {
  constructor(){
    console.log('child constructor')
    super();  //super() will call parent's constructor again
  }
}
let p = new Parent();
let c = new Child();
c.test();   //use super to let the child class can use parents property

hope this is helpful

about 4 years ago · Juan Pablo Isaza Relatório
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