Skip to content

Generic type auto suggestion not working #62605

@realamirhe

Description

@realamirhe

Type: Bug

function useGenericAutoComepleteSample<T extends 'a' | 'b' | 'c'>() {
  return { data: 'a' } as { data: T }
}


const NotWorking = () => {
  const d = useGenericAutoComepleteSample<"">() // no autocomplete or IntelliSense
}

the generic is not suggesting any completion, although the typescript type is correctly inferred

VS Code version: Code 1.105.0 (Universal) (03c265b1adee71ac88f833e065f7bb956b60550a, 2025-10-08T14:09:35.891Z)
OS version: Darwin arm64 24.6.0
Modes:

System Info
Item Value
CPUs Apple M4 Pro (12 x 2400)
GPU Status 2d_canvas: enabled
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
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) 3, 2, 3
Memory (System) 24.00GB (0.21GB free)
Process Argv --crash-reporter-id 2e2001ae-b66e-48f0-a241-955370db487a
Screen Reader no
VM 0%
Extensions disabled
A/B Experiments
vsliv368:30146709
vswsl492cf:30256860
pythonvspyt551:31249599
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
aj953862:31281341
4f60g487:31327383
nes-set-on:31351930
63221493:31336333
envsdeactivate2:31353495
aa_c:31379599
gaj49834:31362110
cloudbuttont:31379625
todos-1:31390405
treatment_gpt5applypatchexclusively:31398171
3efgi100_wstrepl:31382709
trigger-command-fix:31379601
auto_model_enabled:31385282
grok-control-prompt:31401224
use-responses-api:31390855
applesignin:31399435
9i271672:31399627
ddidtcf:31399634
je187915:31401257

Metadata

Metadata

Assignees

No one assigned

    Labels

    Help WantedYou can do thisPossible ImprovementThe current behavior isn't wrong, but it's possible to see that it might be better in some cases

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions