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

94
Views
JSDoc not hinting class properties

I have a simple class User and I am using ES5:

/**
 * @property {number} id
 * @property {string} username
 * @property {string} password
 * @property {string} email
 */
class User {
  
  constructor(obj) {
    ...
  }
}

However I cannot get VSCode's intellisense to hint any of the instance properties if I type say:

let a = new User();
a.|      <-- Here intellisense should hint me id, username, etc...

Intellisense will only hint properties if I explicitly declare them in the constructor like so:

constructor(obj) {
    this.id = 1;
    this.username = '';
}

How can I write the JSDoc in the correct form?

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