8000 Incorrect tool-tip and definition path for import statements in js file · Issue #25197 · microsoft/vscode · GitHub
[go: up one dir, main page]

Skip to content
Incorrect tool-tip and definition path for import statements in js file #25197
@ghost

Description

  • VSCode Version: Code 1.11.2 (6eaebe3, 2017-04-13T08:03:11.395Z)
  • OS Version: Windows_NT ia32 10.0.14393
  • Extensions:
Extension Author Version
xml DotJoshJohnson 1.7.0
EditorConfig EditorConfig 0.9.3
java redhat 0.1.0
html-preview-vscode tht13 0.1.1
cordova-tools vsmobile 1.2.7

Steps to Reproduce:

  1. Clone https://github.com/reactjs/react-redux (edit: and run npm install)
  2. Open the new repo folder with vscode.
  3. Edit the file src/components/connectAdvanced.js.
  4. Hover your mouse pointer over the string 'invariant' on the line that says import invariant from 'invariant'.
  5. Press F12 or otherwise activate the Go to definition command.

In step 4, I expected to see a tool-tip displaying the path to my local node_modules directory inside of my repo. Instead, I was shown a path to the global node_modules/@types directory on my system.

Likewise in step 5, when I pressed F12 vscode opened a index.d.ts instead of opening the local node_modules/invariant/index.js file.

Knowing the types that vscode is using to display Intellisense is not really useful to me because they almost never match the version of the code that I'm actually working with. I would strongly prefer to at least be able navigate to the actual implementation easily instead of to the .d.ts definition file.

Thank you.

Metadata

Metadata

Assignees

Labels

*as-designedDescribed behavior is as designedjavascriptJavaScript support issuestypescriptTypescript support issuesupstreamIssue identified as 'upstream' component related (exists outside of VS Code)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0