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

231
Vistas
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
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