Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

303
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda