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

199
Visualizações
Intellisense not displaying exported object properties, for commonJS files

I did check a dozen of posts before opening this one, but unfortunately I haven't found any solution.

Description

I have a small JS project, been using VSCode (v 1.62.2) to write the code. In one of the projects file, called object.js (commonJS file), I have:

module.exports = {
    waitForFirstTariffToBecomeVisible() {
        // code of the method
    }
}

In a test file called test.js (commonJS file), I'm importing the object.js:

import { page } from '../objectRepository/pages/object';
OR
var page = require("../objectRepository/pages/object");

describe('Suite name', () => {
    it('Test case name', () => {
        page.waitForFirstTariffToBecomeVisible();
    })
});

Problem

VSCode doesn't show me the method name, available on the object I'm importing, even if the test is still executing and does what it should:

enter image description here

As I'm presuming it has to do also with the settings from tsconfig.json, this is what I have here:

{
  "compilerOptions": {
    "module": "commonjs",
    "target": "es2015",
    "allowJs": true,
    "baseUrl": "../node_modules",
    "types": [
      "cypress"
    ],
    "noEmit": true,
    "allowSyntheticDefaultImports": true
  },
  "include": [
    "**/*.*"
  ]
}

Thanks

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