Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

301
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!