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

167
Visualizações
VSCode imported method comment not displayed in intellisense

I have a method in utils file that is commented like this, the body is not important.

/**
 * Calculates width of the column.
 *
 * @param {string} text text.
 * @param {boolean} hasTooltip does title have tooltip?
 * @return {number} width of the column.
 */
const getColumnWidth = (text, hasTooltip) => {
  const padding = 8;
  const tooltipWidth = hasTooltip ? 22 : 0;
  const sortArrowWidth = 26;

  const context = document.createElement('canvas').getContext('2d');
  context.font = getComputedStyle(document.body).font;
  return context.measureText(text).width + padding + tooltipWidth + sortArrowWidth;
}

export {
  ...
  getColumnWidth
};

Then this method is imported in another file.

import {
  ...
  getColumnWidth
} from "c/dceSoftwareUtils";

The problem is when i use intellisense (ctrl + space) i see import instead of method comment: enter image description here

But i need it to be displayed same way as getComputedStyle: enter image description here

I believe this is caused by imported method being seen as property and not a method. How can i change this?

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