• Jobs
  • About Us
  • professionals
    • Home
    • Jobs
    • Courses and challenges
  • business
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

142
Views
JSDoc - JS overload functions/methods

I've been trying to document an overload function in JS using JSDoc:

There's 2 use cases:

assignSlave(ticket, userid);
assignSlave(ticket, firstname, lastname);

I'd like to have it look like this in VSCode:

  • Case 1
  • Case 2

And so on...

I tried the solution given here but it didn't work for me:

/**
 * Test
 *
 * @function assignSlave
 * @param {String} ticket
 * @param {String} userid
 *//**
 * Test2
 *
 * @function assignSlave
 * @param {String} ticket
 * @param {String} firstname
 * @param {String} lastname
 */
function assignSlave(a, b, c){}
assignSlave()

I get this

Is there a way to achieve what I'm trying to do ?

ETA: I tried this article but not sure how it works in my case.

about 3 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 Our process Sales
Legal
Terms and conditions Privacy policy
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recommend me some offers
I have an error