Skip to content

Javascript Intellisense adding "this." to function declaration #54954

@datvm

Description

@datvm

Type: Bug

Enter this code:

class A {

    async #foo // Typing this and IntelliSense starts popping up randomly

}

Now if you press Enter or press ( (I may be wrong here but my muscle memory of declaring methods usually causes this issue to be annoying), it becomes:

class A {

    async this.#foo() { // There should not be this. here
        
    }

}

VS Code version: Code 1.79.2 (695af097c7bd098fbf017ce3ac85e09bbc5dda06, 2023-06-14T08:57:04.379Z)
OS version: Windows_NT x64 10.0.22621
Modes:

System Info
Item Value
CPUs 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz (16 x 2304)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
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) undefined
Memory (System) 15.74GB (7.36GB free)
Process Argv --crash-reporter-id f34a0b62-3444-46af-bdd1-be8d7fd48052
Screen Reader no
VM 0%
Extensions (12)
Extension Author (truncated) Version
better-toml bun 0.3.2
vscode-autohotkey-plus cwe 2.7.1
copilot Git 1.95.233
live-sass gle 6.0.5
csharp ms- 1.26.0
powershell ms- 2023.6.0
vs-keybindings ms- 0.2.1
vscode-yaml red 1.13.0
LiveServer rit 5.7.9
rust-analyzer rus 0.3.1575
vscode-scss-formatter sib 2.5.0
iis-express war 1.5.0
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscoreces:30445986
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
pythonvs932:30410667
py29gd2263:30776702
vsclangdf:30486550
c4g48928:30535728
dsvsc012cf:30540253
pynewext54:30695312
azure-dev_surveyone:30548225
2e4cg342:30602488
pyind779:30671433
89544117:30613380
pythonsymbol12:30671437
2i9eh265:30646982
showlangstatbar:30737416
vsctsb:30748421
pythonms35:30701012
03d35959:30757346
pythonfmttext:30731395
pythoncmv:30756943
fixshowwlkth:30771522
pythongtdpath:30769146
bgfeh915:30780428
pythonnosmt12:30779714
pythonidxpt:30772539
pythonnoceb:30776495

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptFix AvailableA PR has been opened for this issueFixedA PR has been merged for this issue

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions