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

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