Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

200
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!