X Tutup
The Wayback Machine - https://web.archive.org/web/20210623092522/https://github.com/microsoft/TypeScript/issues/41179
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

[JS] Make "Go to implementations" go to the implementation (.js) instead of type definitions file (.d.ts) #41179

Closed
xparadoxical opened this issue Oct 17, 2020 · 2 comments

Comments

@xparadoxical
Copy link

@xparadoxical xparadoxical commented Oct 17, 2020

Issue Type: Feature Request

I'm using a node.js library (puppeteer; installed with npm) which for each <blah>.d.ts file has <blah>.d.ts.map and <blah>.js files. In my code, rightclicking on any function/class/member defined in the .d.ts files and choosing "Go to implementations" (or just Ctrl+Leftclicking it) takes me to .d.ts file instead of .js file. Also, the .d.ts file VSC takes you to comes from %localappdata%\Microsoft\TypeScript\4.0\node_modules\@types\puppeteer dir instead of <projectroot>\node_modules\puppeteer\lib\cjs\puppeteer\common where the source code lives. It's mildly infuriating to have to search through library's source files and find the one .js file.
Example:

const puppeteer = require("puppeteer");
(async () => await puppeteer.launch(...))();

Right-click the launch function, "Go to implementations" and VSCode will happily show you the .d.ts file.

VS Code version: Code 1.50.1 (d2e414d9e4239a252d1ab117bd7067f125afd80a, 2020-10-13T15:06:15.712Z)
OS version: Windows_NT x64 10.0.18363

@mjbvz mjbvz transferred this issue from microsoft/vscode Oct 20, 2020
@mjbvz mjbvz removed their assignment Oct 20, 2020
@andrewbranch
Copy link
Member

@andrewbranch andrewbranch commented Dec 10, 2020

Is this not a duplicate of #6209?

@xparadoxical
Copy link
Author

@xparadoxical xparadoxical commented Dec 10, 2020

Oh, yeah. It is a dupe, sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
X Tutup