microsoft / TypeScript

TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
https://www.typescriptlang.org
Apache License 2.0
101.01k stars 12.49k forks source link

Go to definition unnecessary shows export along true definition #31041

Open wooque opened 5 years ago

wooque commented 5 years ago

Steps to Reproduce:

  1. create foo.js
    
    function foo() {}

module.exports = { foo };

create bar.js

const foo = require('./foo');

foo.foo();


2. In bar.js Ctrl+click on foo() to go to definition. 
It shows both function definition and export from modules.exports
![2019-04-16-201758_592x252_scrot](https://user-images.githubusercontent.com/1936195/56235129-1757eb00-6087-11e9-9384-332307687b0e.png)

<!-- Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes
mjbvz commented 5 years ago

Confirmed on typescript@3.5.0-dev.20190419