Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

completeFunctionCalls should not add this parameters #104877

Closed
xuanduc987 opened this issue Aug 18, 2020 · 0 comments · Fixed by #104479
Closed

completeFunctionCalls should not add this parameters #104877

xuanduc987 opened this issue Aug 18, 2020 · 0 comments · Fixed by #104479
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders typescript Typescript support issues verified Verification succeeded
Milestone

Comments

@xuanduc987
Copy link
Contributor

  • 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

@mjbvz mjbvz self-assigned this Aug 18, 2020
@mjbvz mjbvz added this to the August 2020 milestone Aug 18, 2020
@mjbvz mjbvz added bug Issue identified by VS Code Team member as probable bug typescript Typescript support issues labels Aug 18, 2020
@jrieken jrieken added the verified Verification succeeded label Sep 2, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Oct 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders typescript Typescript support issues verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants
@xuanduc987 @jrieken @mjbvz and others