You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As described in the title, when using project references with disableSourceOfProjectReferenceRedirect set to true and declaration maps enabled, go to definition stops working. Works fine if disableSourceOfProjectReferenceRedirect is set to false.
It seems going to definition just brings you to the closing bracket of the outermost router.
Try going to definition of a router from api client. See where that gets ya.
Additional information
I have a suspicion that this is a typescript bug, but wanted to check with you guys first before submitting an issue there. Our repo has gotten quite large and disableSourceOfProjectReferenceRedirect is the difference between waiting 5-10 seconds on every change and instant feedback in VSCode
👨👧👦 Contributing
🙋♂️ Yes, I'd be down to file a PR fixing this bug!
Funding
You can sponsor this specific effort via a Polar.sh pledge below
We receive the pledge once the issue is completed & verified
The text was updated successfully, but these errors were encountered:
I'm very excited to see the outcome of your work here, but I honestly don't know if this is how TypeScript is meant to work with disableSourceOfProjectReferenceRedirect or not
I wonder if I can make a wild @mattpocock appear? 👀
I don't think this is an issue with tRPC but I also don't think that this is how disableSourceOfProjectReferenceRedirect with declaration maps is supposed to work.
I wasn't able to reproduce this issue outside of using tRPC in my couple hours of digging into this. I am able to import a type and go to definition using a simpler version of the "router type in client" pattern. It seems there is something about tRPC's types that trips up declaration map generation.
Provide environment information
Describe the bug
As described in the title, when using project references with
disableSourceOfProjectReferenceRedirect
set totrue
and declaration maps enabled, go to definition stops working. Works fine ifdisableSourceOfProjectReferenceRedirect
is set tofalse
.It seems going to definition just brings you to the closing bracket of the outermost router.
Link to reproduction
https://github.com/relsunkaev/ts-declaration-map-repro
To reproduce
Try going to definition of a router from api client. See where that gets ya.
Additional information
I have a suspicion that this is a typescript bug, but wanted to check with you guys first before submitting an issue there. Our repo has gotten quite large and
disableSourceOfProjectReferenceRedirect
is the difference between waiting 5-10 seconds on every change and instant feedback in VSCode👨👧👦 Contributing
Funding
The text was updated successfully, but these errors were encountered: