Here is the code snippet I am working with:
const Gatherer = require('../gatherer');
class MetaRobots extends Gatherer {
/**
* @param {{driver: !Driver}} options Run options
…
}
module.exports = MetaRobots;
When using VSCode, Driver
(inside jsdoc) is highlighted as it cannot find its definition. However, the definition of the class exists in the same project:
class Driver {
…
}
module.exports = Driver;
By importing Driver
into the MetaRobots
file (
const Driver = require('../../driver');
), the issue is resolved, but an unused import warning pops up.
Struggling to locate the definition of Driver 😢 https://i.sstatic.net/TlMBw.png
The definition of Driver is found, yet the import remains unused 😢 https://i.sstatic.net/yUSG4.png
Is there any way to guide VSCode about the definition of Driver
without actually importing it?
[EDIT] Additional details:
- VSCode Version 1.17.2 (1.17.2)
- Utilizing plugins like eslint, editorconfig, default ones, as well as themes/icons
- All JS files are utilized (not TS)
- Referencing this jsconfig.json: https://github.com/GoogleChrome/lighthouse/blob/master/jsconfig.json
- Project can be found at: https://github.com/GoogleChrome/lighthouse/