-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Description
Type: Bug
Given 2 files in the same folder:
// file-1.tsx
export default function MyComponentDefault() { }
export function MyComponentNamed() { };// file-2.tsx
import MyComponentDefault, { MyComponentNamed } from './file-1';
/**
* {@link MyComponentDefault}
* {@link MyComponentNamed}
*/
export default function SomeOtherComponent() { }When hovering over SomeOtherComponent in file-2 and clicking the hyperlinked text for either "MyComponentDefault" or "MyComponentNamed" that show in the tooltip (shown below), I would expect that VSCode would jump to the definition for that function in file-1.

However, the actual behavior is that it jumps to the import statement at the top of file-2, rather than the actual function definition in file-1.
Importing the file contents into a namespace will lead to the expected behavior, in that the hyperlinked text in the tooltip (shown below) will jump to the function definitions in file-1. For example:
// file-3.tsx
import * as myNamespace from './file-1';
/**
* {@link myNamespace.default}
* {@link myNamespace.MyComponentNamed}
*/
export default function SomeOtherComponent() { }Ideally, the hyperlinks generated by the first example should also jump to the exported function definitions, rather than the import statements in the same file.
VS Code version: Code 1.84.2 (Universal) (1a5daa3a0231a0fbba4f14db7ec463cf99d7768e, 2023-11-09T10:52:33.687Z)
OS version: Darwin arm64 23.1.0
Modes:
System Info
| Item | Value |
|---|---|
| CPUs | Apple M1 Pro (10 x 24) |
| GPU Status | 2d_canvas: enabled canvas_oop_rasterization: enabled_on direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok video_decode: enabled video_encode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled webgpu: enabled |
| Load (avg) | 3, 3, 3 |
| Memory (System) | 32.00GB (0.83GB free) |
| Process Argv | --crash-reporter-id 36e4fe04-7cfc-4337-b85e-1e0fe3e431e1 |
| Screen Reader | no |
| VM | 0% |
Extensions (46)
| Extension | Author (truncated) | Version |
|---|---|---|
| npm-intellisense | chr | 1.4.5 |
| path-intellisense | chr | 2.8.5 |
| gitignore | cod | 0.9.0 |
| mustache | daw | 1.1.1 |
| vscode-eslint | dba | 2.4.2 |
| xml | Dot | 2.5.1 |
| gitlens | eam | 14.5.0 |
| vscode-html-css | ecm | 1.13.1 |
| code-runner | for | 0.12.1 |
| vscode-pull-request-github | Git | 0.76.1 |
| todo-tree | Gru | 0.0.226 |
| vscode-htmlhint | HTM | 1.0.5 |
| search-node-modules | jas | 1.3.0 |
| unity-code-snippets | kle | 2.2.5 |
| node-module-intellisense | lei | 1.5.0 |
| vscode-json5 | mrm | 1.0.0 |
| vscode-docker | ms- | 1.28.0 |
| csharp | ms- | 2.10.28 |
| vscode-dotnet-runtime | ms- | 2.0.0 |
| isort | ms- | 2023.10.1 |
| python | ms- | 2023.20.0 |
| remote-containers | ms- | 0.321.0 |
| remote-ssh | ms- | 0.107.0 |
| remote-wsl | ms- | 0.81.8 |
| vscode-remote-extensionpack | ms- | 0.24.0 |
| hexeditor | ms- | 1.9.12 |
| remote-explorer | ms- | 0.4.1 |
| remote-server | ms- | 1.5.0 |
| vsliveshare | ms- | 1.0.5892 |
| sqltools | mtx | 0.28.1 |
| sqltools-driver-mysql | mtx | 0.6.0 |
| sqltools-driver-pg | mtx | 0.5.2 |
| vscode-thunder-client | ran | 2.16.0 |
| LiveServer | rit | 5.7.9 |
| todo-tree | Shi | 0.0.1 |
| vsc-quokka-statusbar | ske | 1.3.6 |
| jsobfuscator | Sof | 1.3.2 |
| es6-string-html | Tob | 2.12.1 |
| tom | 1.2.2 | |
| intellicode-api-usage-examples | Vis | 0.2.8 |
| vscodeintellicode | Vis | 1.2.30 |
| quokka-vscode | Wal | 1.0.578 |
| vscode-todo-highlight | way | 1.0.5 |
| vscode-js-console-utils | wht | 0.7.0 |
| JavaScriptSnippets | xab | 1.8.0 |
| html-css-class-completion | Zig | 1.20.0 |
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstes627:30244334
vslsvsres303:30308271
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263cf:30335440
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
pythonvs932:30410667
py29gd2263:30880072
vsclangdf:30486550
c4g48928:30535728
dsvsc012cf:30540253
pynewext54:30695312
azure-dev_surveyone:30548225
282f8724:30602487
f6dab269:30613381
vscrp:30673768
2i9eh265:30646982
showlangstatbar:30737416
pythonfmttext:30731395
fixshowwlkth:30771522
showindicator:30805244
pythongtdpath:30769146
i26e3531:30792625
pythonnosmt12:30797651
pythonidxpt:30866567
pythonnoceb:30805159
dsvsc013:30795093
dsvsc014:30804076
dsvsc015:30845448
pythontestfixt:30871694
pythonregdiag2:30871582
pyreplss1:30886140
pythonmypyd1:30879173
pythoncet0:30885854
pythontbext0:30879054
accentitlementst:30887150
dsvsc016:30886110
dsvsc017cf:30886113
dsvsc018cf:30886115
aa_t_chat:30882232
