Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

239
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda