How to ignore exports when going to definitions in vscode?

Viewed 74

Consider this plain example:

//a.js
function world() { console.log("World world world"); }

module.exports = { world };
//b.js
const a = require('./a');
a.world();

When I ctrl+click / use the "Go to Definitions" command on world from file b, I'm told there are 2 definitions for world and I need to pick the one I wish to jump to. But one of those is the module.exports statement which really isn't interesting or useful at all to me.

Is there a way to ignore the module.exports definition of any/all symbols? So that "Go to definition" will go to the real definition automatically?

enter image description here

0 Answers
Related