Skip to content

completeFunctionCalls should not add this parameters #104877

@xuanduc987

Description

@xuanduc987
  • VSCode Version: 1.47.3
  • OS Version: Darwin x64 18.7.0

Steps to Reproduce:

  1. Enable completeFunctionCall
  2. Create new tyepscript file, ype
function f(this: void) {
	// make sure `this` is unusable in this standalone function
}
f|

cursor at |
3. TAB

Expected: f()
Actual: f(this)

Typescript allow annotating this parameter https://www.typescriptlang.org/docs/handbook/functions.html#this-parameters

function f(this: void) {
  // make sure `this` is unusable in this standalone function
}

Because this parameters are fake parameters, I think we should skip these.

Does this issue occur when all extensions are disabled?: Yes/No

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable buginsiders-releasedPatch has been released in VS Code InsiderstypescriptTypescript support issuesverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions