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

227
Views
JavaScript - JSDoc es6 class is displaying constructor as `new module:MyClass`

I have the current module TextExtractor.js, which exports a class TextExtractor:

/**
 * @file Extract RegEx matches from texts.
 * @author Victorio Molina <victoriomolinabermejo@gmail.com>
 * @license MIT
 * @category Lib
 * @subcategory Text Extractor
 * @module TextExtractor
 */

/**
 * Class for converting any text into Regex matches
 * and React props.
 *
 * @class
 */
export default class TextExtractor {
  /**
   * @param {string} text - The text to manipulate.
   * @param {DetectionOption[]} [detectionOptions=[]] - Detection options.
   */
  constructor(text, detectionOptions = []) {
    /**
     * Text that is being treated.
     *
     * @private
     * @type {string}
     */
    this.#text = text;

    /**
     * @private
     * @type {DetectionOption[]}
     * @default []
     */
    this.#detectionOptions = detectionOptions;
  }

  ...
}

For some reason, when I auto-generate the documentation using JSDoc, it displays the following:

CLASS

module:TextExtractor

module:TextExtractor(text, detectionOptions opt)

Class for converting any text into Regex matches and React props.

CONSTRUCTOR

new module:TextExtractor(text, detectionOptions opt)

What JSDoc tag should I use to avoid displaying the class name as "module:TextExtractor"?

Is it the expected behavior?

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!