salesforcedx-vscode icon indicating copy to clipboard operation
salesforcedx-vscode copied to clipboard

Go to definition of Apex method from LWC redirects to typings directory

Open randi274 opened this issue 2 years ago • 1 comments

Summary

When I use CMD + Click or the formal "Go to Definition" command, on the follow line in an LWC file, I would expect to be redirected to the method itself. However, I am redirected to the typings directory, which isn't useful to show to our users.

Steps To Reproduce:

  1. Have an LWC file that points to an Apex method, such as: import getOrderItems from '@salesforce/apex/OrderController.getOrderItems';.
  2. Use CMD + Click or 'Go to Definition'
  3. You will be redirected to .sfdx > typings > lwc > apex > OrderController.ts

Expected result

I would be redirected to force-app > main > default > classes > OrderController.cls

Actual result

I am redirected to .sfdx > typings > lwc > apex > OrderController.ts

Additional information

https://user-images.githubusercontent.com/9795193/219213793-07d8d294-a4d3-417e-8deb-1901ad683b47.mov

Salesforce Extension Version in VS Code: v57.2.1

SFDX CLI Version: sfdx-cli/7.183.1

OS and version: Mac Ventura 13.2

randi274 avatar Feb 15 '23 23:02 randi274

This issue has been linked to a new work item: W-12553326

git2gus[bot] avatar Feb 15 '23 23:02 git2gus[bot]