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

[TypeScript] Go to definition goes to *.d.ts when across project references #73201

Closed
zen0wu opened this issue May 3, 2019 · 2 comments
Closed
Assignees
Labels
*question Issue represents a question, should be posted to StackOverflow (VS Code) typescript Typescript support issues

Comments

@zen0wu
Copy link

zen0wu commented May 3, 2019

The issue is, with project reference, going to the generated declaration file is really inconvenient. It should be possible to go directly into the source file.

Not sure this is a dup since many issues have been reported and it's unclear whether they're fixed, or whether it's a vscode or TS issue.

Maybe it's related to microsoft/TypeScript#16792 ?

  • VSCode Version: 1.33.1
  • OS Version: OS X 10.14.4

Steps to Reproduce:

  1. clone https://github.com/RyanCavanaugh/project-references-demo.git
  2. run gulp core; gulp animals
  3. open the project using vscode
  4. navigate to animals/dog.ts
  5. do go to definition on the second line, either on the file name or the symbol name
  6. vscode will go into utilities.d.ts

Does this issue occur when all extensions are disabled?: Yes

@vscodebot vscodebot bot assigned mjbvz May 3, 2019
@vscodebot vscodebot bot added the typescript Typescript support issues label May 3, 2019
@mjbvz
Copy link
Collaborator

mjbvz commented May 9, 2019

Can you please try adding "declarationMap": true to the compilerOptions in your tsconfig. This will generated a map so that go to definition can just back to the original ts source instead of the generated d.ts

@mjbvz mjbvz added the info-needed Issue requires more information from poster label May 9, 2019
@zen0wu
Copy link
Author

zen0wu commented May 10, 2019

I think you're right. I did not know that!

Thanks a lot! Closing

@zen0wu zen0wu closed this as completed May 10, 2019
@mjbvz mjbvz added *question Issue represents a question, should be posted to StackOverflow (VS Code) and removed info-needed Issue requires more information from poster labels May 10, 2019
aeremin added a commit to sr-2020/nodejs-monorepo that referenced this issue Jun 20, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Jun 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*question Issue represents a question, should be posted to StackOverflow (VS Code) typescript Typescript support issues
Projects
None yet
Development

No branches or pull requests

2 participants