"Go to" commands don't jump to the implementation
Hi, I am new to WebStorm and a bit surprised that I can't jump directly to the implementation of a lot of functions in the repository I am working on.
I uploaded a short demo project here on Github.
I tried navigating to the implementation of function `f1` there and tried:
- Jump to Source
- Go to Declaration or Usage
- Go to Implementation(s)
- Go to Type Declaration
- Quick Definition
- Quick Type Definition
While "Quick Definition" is the only command that shows me the type that I expect, none of these show or jump to the implementation of function `f1`.
Is this expected behavior? If so, can I work around it to jump to the implementation?
For reference: "Ctrl+Click" in VSCode leads me to the implementation for both functions, which is what I would expect from WebStorm aswell.
Please sign in to leave a comment.
Go to Declaration or Usage doesn't indeed work properly for typed function expressions, the issue is tracked at https://youtrack.jetbrains.com/issue/WEB-55284. Please vote for it to be notified on any feedback
As for Go to Type Declaration & Go to Implementation(s), they work as expected if the function usage is in the same file, like
import {FWithName} from "./typeFWithName"
const f1: FWithName<number, number> = (name) => (input) => input
f1("f2")(1) //both Go to
// Implementation(s) and Go to Type
// Declaration work as expected
export default f1
the issue only occurs with imported modules; submitted to developers as https://youtrack.jetbrains.com/issue/WEB-56005
Thanks very much for these links and tracking the issues Elena Pogorelova, I will keep an eye on them!