-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Description
Issue Type: Bug
When I "go to definition" of module in a JavaScript project it jumps to the TypeScript types file, if available, not the actual definition. If the TypeScript types are not available it will work as expected.
In the past, VSCode maintainers have commented:
It's not that TypeScript types are blocking you from jumping to the implementation
microsoft/vscode#68782 (comment)
and
In general, you cannot jump to the js implementation of a npm module
microsoft/vscode#68782 (comment)
and
it's that there in general is not logic to examine the code of an arbitrary node module and figure out which external invocations map to which implementations in the module.
microsoft/vscode#68782 (comment)
but that's is so clearly just flat-out wrong. There is a separate command for navigating to TypeScript types in the Right-Click context menu: "Go to Type Definition", it appears directly beneath "Go to Definition".
To reiterate: if the TypeScript file is removed everything works as expected.
People don't want to browse TypeScript definition files when stepping through source definitions. Abstractions are leaky. We need to find out why.
VS Code version: Code 1.43.2 (0ba0ca52957102ca3527cf479571617f0de6ed50, 2020-03-24T07:52:11.516Z)
OS version: Linux x64 5.0.0-16-generic