tI have this code:
const Gatherer = require('../gatherer');
class MetaRobots extends Gatherer {
/**
* @param {{driver: !Driver}} options Run options
…
}
module.exports = MetaRobots;
VSCode highlights Driver
(inside jsdoc) because it's unable to find its definition. However, the definition of that class is in the same project:
class Driver {
…
}
module.exports = Driver;
Importing Driver
in the MetaRobots
file (const Driver = require('../../driver');
) fixes the issue, but then I have an unused import.
Can't find definition of Driver 😢
Can find definition of Driver, but Driver import is unused 😢
Is there any way I can hint VSCode about definition of Driver
w/o importing it?
[EDIT] Additional info:
- VSCode Version 1.17.2 (1.17.2)
- Some plugins like eslint, editorconfig, default ones and themes / icons
- All JS files (not TS)
- This jsconfig.json: https://github.com/GoogleChrome/lighthouse/blob/master/jsconfig.json
- This project: https://github.com/GoogleChrome/lighthouse/