-
Notifications
You must be signed in to change notification settings - Fork 991
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
[Bug]: TS go to definition leads to .d.ts
files instead of implementation in Webstorm when using directory named imports
#5097
Comments
Hi ! Welcome ! 😃 I'm not familiar with this, but maybe @dac09 know something about that ? |
This problem should affect the development efficiency of TS users, looking forward to the solution |
I was wondering if this was referring to the problem of Cells not being resolved (which happens in VSCode), so i quickly fired up WebStorm and can confirm that this applies to any component imported such as this: import MyComponent from 'src/components/MyComponent' Workaround is to point to the actual component file, and the code navigation ends up fine in the actual implementation: import MyComponent from 'src/components/MyComponent/MyComponent'
|
@dac09 / @PeterChen1997 i believe this issue should be renamed back to something such as "[Bug] Code navigation leads to generated type in Webstorm using short import" or "[Bug] Short import paths break code navigation in IDE other than VSCode" Navigating to a Cells implementation is a different challenge on it's own that doesn't work in any IDE so far as we know of – this issue was specifically opened about the DX in Webstorm. |
@dac09 / @PeterChen1997 / @simoncrypta / anybody with power to do so – kindly change back the title to s.th. like `[Bug] "Go to defintion..." navigates to types instead of implementation when using short import path in Webstorm" so it doesn't get mistaken as duplicate of #5862 (which affects all IDEs). |
.d.ts
files instead of implementation in Webstorm when using directory named imports
I just rechecked in VSCode and i don't know if it's just me, but it seems to transpire this is an IDE-independent issue: ✔️ Using: ❌ Using @dac09 have a check yourself. Apologies for the kerfuffle, but it seems to make sense change the issue title and remove Not sure if there's an easy fix available though, if at all, or if we'll just have to file that under "known issues / limitations". Personally (given this is not fixable), i'd prefer not to have directory named exports available in the first place and be required to use the full import path, so i never accidentally end up in the type definition. |
Hey @PeterChen1997 and @Philzen, I just merged in #9269 which for me fixed the go-to-definition behaviour in VSCode. Can anyone of you try this out in Webstorm? I'm not confident I'm proficient enough that that IDE to confirm or deny that fix applies to this issue too. You should be able to test this out with the latest canary version to confirm |
Hi @Josh-Walker-GM, I can confirm that Webstorm is still with the same behaviour, opening the .d.ts file, I tested using RedwodJS 6.4.0 in both, Webstorm and VSCode. Only in VSCode this is fixed. |
Thank you @MarcioBarrientos! We'll leave this issue open until we can find a fix for it in Webstorm too |
Definitely also an issue for PhpStorm 2023.3.5 |
Hello, i am new to rwjs, i thinks it's awesome!!
But i found in ts mode, the go to definition will go to the d.ts as the desc in
#234
I want to know is there any solution for this?
The text was updated successfully, but these errors were encountered: