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

tsserver go to definition doesn't work as expected when disableSourceOfProjectReferenceRedirect is enabled #61451

Closed
Tiedye opened this issue Mar 19, 2025 · 2 comments
Labels
Working as Intended The behavior described is the intended behavior; this is not a bug

Comments

@Tiedye
Copy link

Tiedye commented Mar 19, 2025

🔎 Search Terms

"disableSourceOfProjectReferenceRedirect", "project references"

🕗 Version & Regression Information

  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about project references and disableSourceOfProjectReferenceRedirect

⏯ Playground Link

https://github.com/Tiedye/ts-61449

💻 Code

No response

🙁 Actual behavior

Go to definition directs to the compiled d.ts

🙂 Expected behavior

Go to definition should go to the source files

Additional information about the issue

I need to use disableSourceOfProjectReferenceRedirect in my project as it takes a couple seconds to compile some of the projects, and tsserver doesn't seem to cache those results so every time I ask for autocompetion there is a 5 second delay. With this option there is no delay

@Tiedye Tiedye changed the title tsserver go to definition doesn't work when disableSourceOfProjectReferenceRedirect is enabled tsserver go to definition doesn't work as expected when disableSourceOfProjectReferenceRedirect is enabled Mar 19, 2025
@RyanCavanaugh RyanCavanaugh added the Working as Intended The behavior described is the intended behavior; this is not a bug label Mar 20, 2025
@RyanCavanaugh
Copy link
Member

You need to turn on declarationMap in the referenced project. As is, we have no idea that a .ts file even exists in this configuration.

@Tiedye
Copy link
Author

Tiedye commented Mar 20, 2025

Oh awesome. Thanks for looking into it!

@Tiedye Tiedye closed this as completed Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Working as Intended The behavior described is the intended behavior; this is not a bug
Projects
None yet
Development

No branches or pull requests

2 participants