Skip to content

Quick fix "Convert function into ES2015 class (ts80002)" doesn't work #81409

@LWChris

Description

@LWChris

Issue Type: Bug

In a JS file, write this:

(function() {
    let x = () => {
        this.y = 1;
    };
})();

VS Code shows dots below the f of function and suggests (yellow bulb) to convert the function into an ES2015 class. However, applying the quick fix does nothing for me.

I tried it by various ways. These three ways to open the quick fix dropdown:

  • Setting the cursor to the f, then clicking the bulb
  • Setting the cursor to the f, then pressing Ctrl+.
  • Hovering the f, then clicking on the "Show quick fixes ..." link in the popup's footer

And those two ways to accept the quick fix:

  • Clicking the dropdown entry
  • Pressing Enter on the entry

All 6 combinations to not work.

The quick fix to remove the declaration of x does work (blue bulb), so it might either be that particular quick fix or because it's a different issue level.

VS Code version: Code 1.38.1 (b37e54c, 2019-09-11T13:35:15.005Z)
OS version: Windows_NT x64 10.0.18362

System Info
Item Value
CPUs Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz (8 x 3600)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_deferred_display_list: disabled_off
skia_renderer: disabled_off
surface_synchronization: enabled_on
video_decode: enabled
viz_display_compositor: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 15.93GB (11.13GB free)
Process Argv
Screen Reader no
VM 0%
Extensions (1)
Extension Author (truncated) Version
vscode-language-pack-de MS- 1.38.4

Metadata

Metadata

Assignees

Labels

editor-code-actionsEditor inplace actions (Ctrl + .)javascriptJavaScript support issuesupstreamIssue identified as 'upstream' component related (exists outside of VS Code)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions