Find usages not working across typescript modules in yarn workspaces Follow
I'm using Intellj Idea Ultimate 2018,3.2 and I'm having trouble getting Find Usages and refactor to work across modules. I have set up an example yarn workspaces project containing a few typescript modules. If I do Find Usages or refactorings such as rename, I only get usages in the declaring module. Go To Declaration works correctly across modules.
example project: https://github.com/asammartin/workspaces-example
Please sign in to leave a comment.
JavaScript/Typescript usages are not found accross IDEA modules boundaries - this is expected... Each IDEA module is isolated, and files from different modules are not visible unless explicitly added to module dependencies.
However your setup doesn't work when using a single module as well... Seems that Typescript language service (tsserver) can't correctly handle this configuration (lerna+yarn workspaces+Typescript 3.0 project references), as I can see similar errors/issues when opening your project in the most recent VSCode version (no completion/usages navigation, Tsserver errors on imports):
I've got a similar problem but I don't want to refactor accross modules.
I'm wondering if following behaviours is expected:
I've got 3 typescript classes: 2 of them have an ID and those id's are both used inside the third class.
If i press alt + F7 onto an id-declaration of one of those two classes with an id. Intellij makes more or less just a case-sensitiv text-search over all files and it shows me all usages for id.
can you share a sample project/files that can be used to recreate the issue?