javascript intellisense not handling nested jsdoc parameter type with array of defined type
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
Type: Bug
If I have a function that jsdoc, and a parameter on it is defined as an array of custom types, when you go to autocomplete/inspect the call, you only get hinting on the first element of the array.
VS Code version: Code - Insiders 1.137.0-insider (Universal) (af195aabe861b9d99fcb322904793322ae7f0952, 2026-09-03T08:01:42+02:00)
OS version: Darwin arm64 24.6.0
Modes:
System Info
|Item|Value|
|---|---|
|CPUs|Apple M3 Pro (12 x 2400)|
|GPU Status|2d_canvas: enabled
GPU0: VENDOR= 0x106b [Google Inc. (Apple)], DEVICE=0x0000 [ANGLE (Apple, ANGLE Metal Renderer: Apple M3 Pro, Version 15.7.9 (Build 24G830))], DRIVER_VENDOR=Apple, DRIVER_VERSION=15.7.9 *ACTIVE*
Machine model name: Mac
Machine model version: 15.7
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
skia_graphite: enabled_on
trees_in_viz: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgpu: enabled
webnn: disabled_off|
|Load (avg)|2, 2, 3|
|Memory (System)|36.00GB (0.29GB free)|
|Process Argv|--crash-reporter-id e1738320-cefc-4c4f-8f67-a2b1e3258dd4|
|Screen Reader|no|
|VM|0%|
Extensions (50)
Name|Identifier|Author|Version
---|---|---|---
Better JSON5|blueglassblock.better-json5|BlueGlassBlock|1.7.0
Ruff|charliermarsh.ruff|charliermarsh|2026.76.0
ESLint|dbaeumer.vscode-eslint|dbaeumer|3.0.34
Docker DX|docker.docker|docker|0.18.0
GitLens — Git supercharged|eamodio.gitlens|eamodio|19.1.0
file-icons|file-icons.file-icons|file-icons|1.1.0
shell-format|foxundermoon.shell-format|foxundermoon|7.2.8
GitHub Pull Requests|github.vscode-pull-request-github|GitHub|0.164.0
Go|golang.go|golang|0.56.1
HashiCorp HCL|hashicorp.hcl|hashicorp|0.6.0
HashiCorp Terraform|hashicorp.terraform|hashicorp|2.40.0
Mise VSCode|hverlin.mise-vscode|hverlin|1.25.0
Jenkins Pipeline Linter Connector|janjoerke.jenkins-pipeline-linter-connector|janjoerke|1.2.0
Bash IDE|mads-hartmann.bash-ide-vscode|mads-hartmann|1.43.0
Container Tools|ms-azuretools.vscode-containers|ms-azuretools|2.5.0
Docker|ms-azuretools.vscode-docker|ms-azuretools|2.0.0
Kubernetes|ms-kubernetes-tools.vscode-kubernetes-tools|ms-kubernetes-tools|1.4.1
Playwright Test for VSCode|ms-playwright.playwright|ms-playwright|1.1.19
Black Formatter|ms-python.black-formatter|ms-python|2026.7.12461009
Python Debugger|ms-python.debugpy|ms-python|2026.7.12401009
isort|ms-python.isort|ms-python|2026.7.12461009
Python|ms-python.python|ms-python|2026.7.2026082601
Pylance|ms-python.vscode-pylance|ms-python|2026.3.1
Python Environments|ms-python.vscode-python-envs|ms-python|1.37.2026082701
Jupyter|ms-toolsai.jupyter|ms-toolsai|2026.6.2026071501
Jupyter Keymap|ms-toolsai.jupyter-keymap|ms-toolsai|1.1.2
Jupyter Notebook Renderers|ms-toolsai.jupyter-renderers|ms-toolsai|1.3.0
Jupyter Cell Tags|ms-toolsai.vscode-jupyter-cell-tags|ms-toolsai|0.1.9
Jupyter Slide Show|ms-toolsai.vscode-jupyter-slideshow|ms-toolsai|0.1.6
Dev Containers|ms-vscode-remote.remote-containers|ms-vscode-remote|0.468.0
Makefile Tools|ms-vscode.makefile-tools|ms-vscode|0.12.17
Flame Chart Visualizer for JavaScript Profiles|ms-vscode.vscode-js-profile-flame|ms-vscode|1.0.11
Love2D Support|pixelbyte-studios.pixelbyte-love2d|pixelbyte-studios|0.1.27
Ansible|redhat.ansible|redhat|26.8.2
Language Support for Java(TM) by Red Hat|redhat.java|redhat|1.55.0
Red Hat Commons|redhat.vscode-commons|redhat|0.0.6
YAML|redhat.vscode-yaml|redhat|1.24.0
Ruby LSP|shopify.ruby-lsp|Shopify|0.10.6
Lua|sumneko.lua|sumneko|3.19.1
Even Better TOML|tamasfe.even-better-toml|tamasfe|0.21.2
UV Toolkit|the0807.uv-toolkit|the0807|0.1.11
ShellCheck|timonwong.shellcheck|timonwong|0.39.5
Error Lens|usernamehw.errorlens|usernamehw|3.28.0
Gradle for Java|vscjava.vscode-gradle|vscjava|3.18.0
Debugger for Java|vscjava.vscode-java-debug|vscjava|0.59.0
Project Manager for Java|vscjava.vscode-java-dependency|vscjava|0.27.6
Extension Pack for Java|vscjava.vscode-java-pack|vscjava|0.31.1
Test Runner for Java|vscjava.vscode-java-test|vscjava|0.46.0
Maven for Java|vscjava.vscode-maven|vscjava|0.45.3
TODO Highlight|wayou.vscode-todo-highlight|wayou|1.0.5
A/B Experiments
```
vsliv368cf:30146710
pythonvspyt551cf:31249598
nativeloc1:31118317
dwcopilot:31158714
dwoutputs:31242946
copilot_t_ci:31333650
g012b348:31231168
pythonrdcb7:31268811
pythonpcpt1:31399616
6518g693:31302842
envsactivate1:31349248
editstats-enabled:31346256
cloudbuttont:31366566
3efgi100_wstrepl:31403338
cp_cls_t_966_ss:31526232
4je02754:31565972
8hhj4413:31478653
cp_cls_c_1081:31454833
conptydll_true:31485575
e9c30283:31453065
46204921:31447328
ei9d7968:31462942
hhf17803:31462392
h08i8180_copy:31475366
ddid_t:31478204
hmra_i5g22:31518061
bjc72774_agent_sandbox:31538428
7df3h592:31491241
cp_cls_t_1082:31535311
logging_enabled_new:31490725
jb_cp_cls_t_632:31543129
32d76977:31503652
ha629193:31508444
a1ije391_t:31533808
jbcp_cls_pctr_t:31531130
cp_intellij_t_nes:31548657
jf4hg949:31526829
hide-eh-duplicates:31543293
replace-eh-with-ah:31545853
ihg5j128:31534457
sandbox-ui-on-2:31543161
enable_editor_pane_layout:31551200
52258b4d:31547953
36h42362:31560305
c7c27ce7:31551212
1h923230:31564177
0dg73464:31554309
treatment-23-1:31555779
unuse_dynamic_mcp:31555281
0c1h4866:31562347
cch_brk_fls:31570145
5b8j3302:31564600
mangle-name-treatment:31568054
allow-signed-out:31574470
codex-agent-enabled:31566739
64a8d082:31573709
issue8950-e3349a92:31574958
39a5d156:31574988
ae8b2313:-9
2bfb8b39:31576696
permission_prompt_control:1332567
ccr_pr_nudge_adoption:1319471
vsc_wsm_t:1324223
eh853263:1370294
auto_mode_treatment:1367907
ce50c479:1367875
```
1. Create a new directory
2. Ensure it has at least a blank `jsconfig.json`
3. Trust the directory
4. Add a file with the contents:
```js
/**
* @typedef Inner
* @property {string} s the string
* @property {number} n the number
*/
/**
* @typedef Outer
* @property {[Inner]} inners
*/
/**
* @param {Outer} o
*/
function f(o) {
}
f({inners: [{n: 1, s: 'a'}, {n: 0}]})
```
Hover over the first `n`, see that it knows that it's a property and pulls in the description from the Inner typedef. Do the same with the second `n`, and see that it doesn't use the defined type.
This also affects autocomplete. Completions in the first element work fine, not in any others.
Contributor guide
Assessment
This issue has not been assessed yet.