Issue Type: Bug
I'm not 100% sure this is a bug, but it isn't what I expect to happen so I wanted to clarify.
If I have a type type test<T extends "x" |"y"> = T then when I type let val: test<" the autocompletion correctly appears and suggests either "x" or "y" as options.
However, if I have a function function test<T extends "x" | "y">() {} then when I try to call test and type test<" it doesn't suggest anything. I would have expected it to again suggest "x" or "y" as options. Fully typing test<"">() and hitting command + space still doesn't suggest anything. The type error Type '""' does not satisfy the constraint '"x" | "y"' does appear so Typescript seems to know what acceptable values are, just it doesn't suggest them.
Is this a bug or working as expected?
VS Code version: Code 1.35.1 (c7d83e5, 2019-06-12T14:29:22.216Z)
OS version: Darwin x64 18.7.0
System Info
| Item |
Value |
| CPUs |
Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz (12 x 2200) |
| GPU Status |
2d_canvas: enabled checker_imaging: disabled_off flash_3d: enabled flash_stage3d: enabled flash_stage3d_baseline: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on native_gpu_memory_buffers: enabled rasterization: enabled surface_synchronization: enabled_on video_decode: enabled webgl: enabled webgl2: enabled |
| Load (avg) |
2, 2, 2 |
| Memory (System) |
16.00GB (1.91GB free) |
| Process Argv |
|
| Screen Reader |
no |
| VM |
0% |
Extensions (4)
| Extension |
Author (truncated) |
Version |
| vscode-eslint |
dba |
1.9.0 |
| prettier-vscode |
esb |
2.3.0 |
| Go |
ms- |
0.11.7 |
| vscode-typescript-tslint-plugin |
ms- |
1.2.2 |
Issue Type: Bug
I'm not 100% sure this is a bug, but it isn't what I expect to happen so I wanted to clarify.
If I have a type
type test<T extends "x" |"y"> = Tthen when I typelet val: test<"the autocompletion correctly appears and suggests either "x" or "y" as options.However, if I have a function
function test<T extends "x" | "y">() {}then when I try to call test and typetest<"it doesn't suggest anything. I would have expected it to again suggest "x" or "y" as options. Fully typingtest<"">()and hitting command + space still doesn't suggest anything. The type errorType '""' does not satisfy the constraint '"x" | "y"'does appear so Typescript seems to know what acceptable values are, just it doesn't suggest them.Is this a bug or working as expected?
VS Code version: Code 1.35.1 (c7d83e5, 2019-06-12T14:29:22.216Z)
OS version: Darwin x64 18.7.0
System Info
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: enabled
rasterization: enabled
surface_synchronization: enabled_on
video_decode: enabled
webgl: enabled
webgl2: enabled
Extensions (4)