Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why vscode jump to a .d.ts file when I command click a module #30604

Closed
vanvanj opened this issue Jul 13, 2017 · 4 comments
Closed

Why vscode jump to a .d.ts file when I command click a module #30604

vanvanj opened this issue Jul 13, 2017 · 4 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) javascript JavaScript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)

Comments

@vanvanj
Copy link

vanvanj commented Jul 13, 2017

import { Provider } from 'react-redux';

When I command click the 'react-redux' I wanna see the source code which is a .js file, but the vscode jump to a .d.ts file instead. How can I fix this?

@vscodebot vscodebot bot added the javascript JavaScript support issues label Jul 13, 2017
@tnngo
Copy link

tnngo commented Jul 13, 2017

JS is weakly typed

@vanvanj
Copy link
Author

vanvanj commented Jul 14, 2017

I want the vscode jump to a .js file when I command click the module name. I think it's not about the language is strong typed or weak typed

@mjbvz mjbvz added *duplicate Issue identified as a duplicate of another issue(s) upstream Issue identified as 'upstream' component related (exists outside of VS Code) labels Jul 14, 2017
@mjbvz
Copy link
Collaborator

mjbvz commented Jul 14, 2017

Duplicate of microsoft/TypeScript#14479
Duplicate of microsoft/TypeScript#6209

This is currently a limitation of how the TypeScript server that powers both our JS and TS intellisense works. We use d.ts files for module intellisense in order to provide rich suggestions without having to parse or understand the JavaScript implementation. This is done both for performance reasons and to leverage TS language features when describing JavaScript APIs

Closing as upstream

@mjbvz mjbvz marked this as a duplicate of microsoft/TypeScript#14479 Jul 14, 2017
@mjbvz mjbvz marked this as a duplicate of microsoft/TypeScript#6209 Jul 14, 2017
@mjbvz mjbvz closed this as completed Jul 14, 2017
@hoegge
Copy link

hoegge commented Jul 18, 2017

But why can't the intellisense find the way to the implementation in the originating .ts file instead of just the .d.ts file?

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) javascript JavaScript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests

4 participants